Troy Rollo : shell32: Fix bug in renaming files in the file dialogs
when UNIX paths
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jan 10 14:13:48 CST 2006
Module: wine
Branch: refs/heads/master
Commit: e80a85a33bca104e04a3343bda46e5f19dbb153a
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=e80a85a33bca104e04a3343bda46e5f19dbb153a
Author: Troy Rollo <wine at troy.rollo.name>
Date: Tue Jan 10 12:08:28 2006 +0100
shell32: Fix bug in renaming files in the file dialogs when UNIX paths
are being used.
---
dlls/shell32/shfldr_unixfs.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c
index 394a8c6..e5aee56 100644
--- a/dlls/shell32/shfldr_unixfs.c
+++ b/dlls/shell32/shfldr_unixfs.c
@@ -1266,7 +1266,17 @@ static HRESULT WINAPI UnixFolder_IShellF
return E_FAIL;
/* Build a pidl for the path of the renamed file */
- pwszDosDest = wine_get_dos_file_name(szDest);
+ if (This->m_dwPathMode == PATHMODE_DOS)
+ {
+ 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)) {
HeapFree(GetProcessHeap(), 0, pwszDosDest);
rename(szDest, szSrc); /* Undo the renaming */
More information about the wine-cvs
mailing list