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_f…
==============================================================================
--- 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;