Skip to content

Commit 6abfc7f

Browse files
Evgeny Pashkindscho
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 abf3368 commit 6abfc7f

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
@@ -886,7 +886,7 @@ static void free_path_split(char **path)
886886
static char *lookup_prog(const char *dir, const char *cmd, int isexe, int exe_only)
887887
{
888888
char path[MAX_PATH];
889-
snprintf(path, sizeof(path), "%s/%s.exe", dir, cmd);
889+
snprintf(path, sizeof(path), "%s\\%s.exe", dir, cmd);
890890

891891
if (!isexe && access(path, F_OK) == 0)
892892
return xstrdup(path);

0 commit comments

Comments
 (0)