mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +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:
parent
347b83c2c0
commit
01d0181342
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue