From bb2602797ecdb5e1dc67c02ea292d8f1d56b9e0b Mon Sep 17 00:00:00 2001 From: johnstevenson Date: Sun, 3 Nov 2013 18:57:59 +0000 Subject: [PATCH] Fix find_msysgit_in_path() when PATH is in cmd folder rather than bin msysgit_in_path() expects the PATH to git.exe to be in "../bin/"" whereas Git for Windows uses "../cmd/". This results in the PathToMsys registry value being set to "../cmd/git.exe" which means that git_path() will always fail. This only happens when the dll is outside the git-cheetah folder, as can be the case when you are debugging. Signed-off-by: johnstevenson --- explorer/dll.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/explorer/dll.c b/explorer/dll.c index bf8376d..bbfae11 100644 --- a/explorer/dll.c +++ b/explorer/dll.c @@ -190,11 +190,12 @@ static BOOL find_msysgit_in_path() /* * git.exe is in "\bin\" from what we really need * the minimal case we can handle is c:\bin\git.exe - * otherwise declare failure + * otherwise declare failure. We additionally check + * for Git for Windows where it is placed in ..\Git\cmd\ */ if (file < msysgit + 7) return FALSE; - if (strnicmp(file - 5, "\\bin\\", 5)) + if (strnicmp(file - 5, "\\bin\\", 5) && strnicmp(file - 5, "\\cmd\\", 5)) return FALSE; file[-5] = '\0'; -- 2.11.4.GIT