From 5a8a1d024bee83eff8d9a85ae6dda6c8823c3f2e Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Fri, 20 Jan 2012 15:01:14 +0100 Subject: [PATCH] Implement osl_identicalDirectoryItem for win32 --- sal/osl/w32/file_dirvol.cxx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sal/osl/w32/file_dirvol.cxx b/sal/osl/w32/file_dirvol.cxx index 8e3ea7f9f284..76948182c873 100644 --- a/sal/osl/w32/file_dirvol.cxx +++ b/sal/osl/w32/file_dirvol.cxx @@ -1219,6 +1219,26 @@ oslFileError SAL_CALL osl_releaseDirectoryItem( oslDirectoryItem Item ) return osl_File_E_None; } + +sal_Bool +SAL_CALL osl_identicalDirectoryItem( oslDirectoryItem a, oslDirectoryItem b) +{ + DirectoryItem_Impl *pA = (DirectoryItem_Impl *) a; + DirectoryItem_Impl *pB = (DirectoryItem_Impl *) b; + if (a == b) + return sal_True; + /* same name => same item, unless renaming / moving madness has occurred */ + if (rtl_ustr_compare_WithLength( + pA->m_pFullPath->buffer, pA->m_pFullPath->length, + pB->m_pFullPath->buffer, pB->m_pFullPath->length ) == 0) + return sal_True; + + // FIXME: as/when/if this is used in anger on Windows we could + // do better here. + + return sal_False; +} + //##################################################### // volume / file info handling functions //#####################################################