Changeset 243940fe4a1d…
Parent aa28a21c1b0a…
by
Changes to one file · Browse files at 243940fe4a1d Showing diff from parent aa28a21c1b0a Diff from another changeset...
@@ -350,6 +350,8 @@ return NOERROR;
}
+#include "Winstat.h"
+
void CShellExt::DoHgtk(const std::string &cmd)
{
std::string dir = GetTHgProgRoot();
@@ -358,7 +360,16 @@ TDEBUG_TRACE("DoHgtk: THG root is empty");
return;
}
- std::string hgcmd = Quote(dir + "\\hgtk.exe") + " " + cmd;
+ std::string hgcmd = Quote(dir + "\\hgtk.exe");
+
+ WIN32_FIND_DATAA data;
+ HANDLE hfind = FindFirstFileA(hgcmd.c_str(), &data);
+ if (hfind == INVALID_HANDLE_VALUE)
+ std::string hgcmd = Quote(dir + "\\hgtk.cmd");
+ else
+ FindClose(hfind);
+
+ hgcmd += " " + cmd;
std::string cwd;
if (!myFolder.empty())
|
Loading...