From 01d01813428e2c75ca2c921a1a78c16d8389d5ae Mon Sep 17 00:00:00 2001 From: Evgeny Pashkin Date: Thu, 29 Sep 2011 22:32:37 +0400 Subject: [PATCH] Fixed wrong path delimiter in exe finding On Windows XP3 in git bash git clone git@github.com:octocat/Spoon-Knife.git cd Spoon-Knife git gui menu Remote\Fetch from\origin error: cannot spawn git: No such file or directory error: could not run rev-list if u run git fetch --all it worked normal in git bash or gitgui tools In second version CreateProcess get 'C:\Git\libexec\git-core/git.exe' in first version - C:/Git/libexec/git-core/git.exe and not executes (unix slashes) after fixing C:\Git\libexec\git-core\git.exe or C:/Git/libexec/git-core\git.exe it works normal Signed-off-by: Johannes Schindelin --- compat/mingw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compat/mingw.c b/compat/mingw.c index 0b0d405c68..57d41ddc17 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -817,7 +817,7 @@ static void free_path_split(char **path) static char *lookup_prog(const char *dir, const char *cmd, int isexe, int exe_only) { char path[MAX_PATH]; - snprintf(path, sizeof(path), "%s/%s.exe", dir, cmd); + snprintf(path, sizeof(path), "%s\\%s.exe", dir, cmd); if (!isexe && access(path, F_OK) == 0) return xstrdup(path); -- 2.11.4.GIT