mirror of
https://github.com/git/git.git
synced 2026-02-03 06:21:39 +00:00
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 <johannes.schindelin@gmx.de>
This commit is contained in:
committed by
Johannes Schindelin
parent
bdae1f47fc
commit
53b0021449
@@ -927,7 +927,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);
|
||||
|
||||
Reference in New Issue
Block a user