- 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:
Johannes Anderwald 2008-08-24 16:43:08 +00:00
parent 5486706e21
commit 1e3bc51e71

View file

@ -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;