Let WinBoard start in its installation folder
authorH.G. Muller <h.g.muller@hccnet.nl>
Fri, 1 Feb 2013 18:31:18 +0000 (19:31 +0100)
committerH.G. Muller <h.g.muller@hccnet.nl>
Fri, 1 Feb 2013 18:31:18 +0000 (19:31 +0100)
The current directory in WinBoard was not automatically the same as the
installDir returned by SearchPath. Especially not if used without shortcut
by file association.

winboard/winboard.c

index 1b6297e..1359d20 100644 (file)
@@ -1063,6 +1063,7 @@ InitInstance(HINSTANCE hInstance, int nCmdShow, LPSTR lpCmdLine)
 \r
   if (SearchPath(NULL, "WinBoard.exe", NULL, MSG_SIZ, installDir, &filepart)) {\r
     *filepart = NULLCHAR;\r
+    SetCurrentDirectory(installDir);\r
   } else {\r
     GetCurrentDirectory(MSG_SIZ, installDir);\r
   }\r