mirror of
https://github.com/reactos/reactos.git
synced 2024-10-25 07:26:45 +00:00
- Check if source and destination is the same. Fixes creating a new directory and using the default name
svn path=/trunk/; revision=35603
This commit is contained in:
parent
5486706e21
commit
1e3bc51e71
|
@ -886,6 +886,16 @@ static HRESULT WINAPI IShellFolder_fnSetNameOf (IShellFolder2 * iface,
|
|||
}
|
||||
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue