Skip to content

Commit a799532

Browse files
Evgeny Pashkinnalla
authored andcommitted
Fixed wrong path delimiter in exe finding
On Windows XP3 in git bash git clone [email protected]: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 <[email protected]>
1 parent 783fb28 commit a799532

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compat/mingw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ static void free_path_split(char **path)
869869
static char *lookup_prog(const char *dir, const char *cmd, int isexe, int exe_only)
870870
{
871871
char path[MAX_PATH];
872-
snprintf(path, sizeof(path), "%s/%s.exe", dir, cmd);
872+
snprintf(path, sizeof(path), "%s\\%s.exe", dir, cmd);
873873

874874
if (!isexe && access(path, F_OK) == 0)
875875
return xstrdup(path);

0 commit comments

Comments
 (0)