[ros-diffs] [janderwald] 35603: - Check if source and destination is the same. Fixes creating a new directory and using the default name

janderwald at svn.reactos.org janderwald at svn.reactos.org
Sun Aug 24 18:43:09 CEST 2008


Author: janderwald
Date: Sun Aug 24 11:43:08 2008
New Revision: 35603

URL: http://svn.reactos.org/svn/reactos?rev=35603&view=rev
Log:
- Check if source and destination is the same. Fixes creating a new directory and using the default name

Modified:
    trunk/reactos/dll/win32/shell32/shfldr_fs.c

Modified: trunk/reactos/dll/win32/shell32/shfldr_fs.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shfldr_fs.c?rev=35603&r1=35602&r2=35603&view=diff
==============================================================================
--- trunk/reactos/dll/win32/shell32/shfldr_fs.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shfldr_fs.c [iso-8859-1] Sun Aug 24 11:43:08 2008
@@ -886,6 +886,16 @@
     }
 
     TRACE ("src=%s dest=%s\n", debugstr_w(szSrc), debugstr_w(szDest));
+    if (!memcmp(szSrc, szDest, (wcslen(szDest)+1) * sizeof(WCHAR)))
+    {
+        /* src and destination is the same */
+        HRESULT hr = S_OK;
+        if (pPidlOut)
+            hr = _ILCreateFromPathW(szDest, pPidlOut);
+
+        return hr;
+    }
+
 
     if (MoveFileW (szSrc, szDest)) {
         HRESULT hr = S_OK;



More information about the Ros-diffs mailing list