shell32: Fix bug in renaming files in the file dialogs when UNIX paths
are being used.
This commit is contained in:
parent
c03b21e9ca
commit
e80a85a33b
@ -1266,7 +1266,17 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_SetNameOf(IShellFolder2* iface, H
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
/* Build a pidl for the path of the renamed file */
|
/* Build a pidl for the path of the renamed file */
|
||||||
|
if (This->m_dwPathMode == PATHMODE_DOS)
|
||||||
|
{
|
||||||
pwszDosDest = wine_get_dos_file_name(szDest);
|
pwszDosDest = wine_get_dos_file_name(szDest);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int len = MultiByteToWideChar(CP_UNIXCP, 0, szDest, -1, NULL, 0);
|
||||||
|
|
||||||
|
pwszDosDest = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
|
||||||
|
MultiByteToWideChar(CP_UNIXCP, 0, szDest, -1, pwszDosDest, len);
|
||||||
|
}
|
||||||
if (!pwszDosDest || !UNIXFS_path_to_pidl(This, pwszDosDest, &pidlDest)) {
|
if (!pwszDosDest || !UNIXFS_path_to_pidl(This, pwszDosDest, &pidlDest)) {
|
||||||
HeapFree(GetProcessHeap(), 0, pwszDosDest);
|
HeapFree(GetProcessHeap(), 0, pwszDosDest);
|
||||||
rename(szDest, szSrc); /* Undo the renaming */
|
rename(szDest, szSrc); /* Undo the renaming */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user