Alexandre Julliard : write: Always append a backslash to the system directory.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Oct 28 02:24:35 CDT 2014


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Oct 28 15:47:42 2014 +0900

write: Always append a backslash to the system directory.

---

 programs/write/write.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/programs/write/write.c b/programs/write/write.c
index 8012355..4039af4 100644
--- a/programs/write/write.c
+++ b/programs/write/write.c
@@ -25,8 +25,7 @@
 #include <windows.h>
 #include "resources.h"
 
-static const WCHAR SZ_BACKSLASH[] = {'\\',0};
-static const WCHAR SZ_WORDPAD[]   = {'w','o','r','d','p','a','d','.','e','x','e',0};
+static const WCHAR SZ_WORDPAD[]   = {'\\','w','o','r','d','p','a','d','.','e','x','e',0};
 
 int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hOldInstance, LPSTR szCmdParagraph, int res)
 {
@@ -36,8 +35,6 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hOldInstance, LPSTR szCmdPar
 
     if (!GetSystemDirectoryW(path, MAX_PATH - 1 - lstrlenW(SZ_WORDPAD)))
 	goto failed;
-    if (path[lstrlenW(path) - 1] != '\\')
-	lstrcatW(path, SZ_BACKSLASH);
     lstrcatW(path, SZ_WORDPAD);
 
     stinf.cb = sizeof(STARTUPINFOW);




More information about the wine-cvs mailing list