Bruno Jesus : winefile: Allow paths with spaces.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Dec 15 15:32:05 CST 2014


Module: wine
Branch: master
Commit: a9c00c66d0495d0a78dd50467d14de16bae6ea46
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a9c00c66d0495d0a78dd50467d14de16bae6ea46

Author: Bruno Jesus <00cpxxx at gmail.com>
Date:   Sat Dec 13 13:59:42 2014 -0200

winefile: Allow paths with spaces.

---

 programs/winefile/winefile.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/programs/winefile/winefile.c b/programs/winefile/winefile.c
index dee98c9..7046ad0 100644
--- a/programs/winefile/winefile.c
+++ b/programs/winefile/winefile.c
@@ -1323,9 +1323,17 @@ static ChildWnd* alloc_child_window(LPCWSTR path, LPITEMIDLIST pidl, HWND hwnd)
 
 	if (path)
 	{
-		lstrcpyW(child->path, path);
+		int pathlen = strlenW(path);
+		const WCHAR *npath = path;
 
-		_wsplitpath(path, drv, dir, name, ext);
+		if (path[0] == '"' && path[pathlen - 1] == '"')
+		{
+			npath++;
+			pathlen--;
+		}
+		lstrcpynW(child->path, npath, pathlen + 1);
+
+		_wsplitpath(child->path, drv, dir, name, ext);
 	}
 
 	lstrcpyW(child->filter_pattern, sAsterics);




More information about the wine-cvs mailing list