Changeset 782189b23886…
Parent 4ffd4faae331…
by
Changes to 3 files · Browse files at 782189b23886 Showing diff from parent 4ffd4faae331 Diff from another changeset...
@@ -36,7 +36,14 @@ if (GetRegistryConfig("EnableOverlays", cval) != 0 && cval == "0")
return S_FALSE;
- std::string path = WideToMultibyte(pwszPath);
+ // This overlay handler processes all filenames in lowercase, so that a path
+ // "C:\FOO\BAR\Baz.TXT" will be considered equal to "C:\foo\bar\baz.txt"
+ // (note that mercurial preserves the case of filenames in .hg/dirstate)
+
+ std::wstring lowerpath(pwszPath);
+ ::CharLowerW(const_cast<wchar_t*>(lowerpath.c_str()));
+
+ std::string path = WideToMultibyte(lowerpath.c_str());
if (GetRegistryConfig("LocalDisksOnly", cval) != 0 && cval != "0"
&& PathIsNetworkPath(path.c_str()))
|
@@ -116,6 +116,7 @@ if (line.size() > 1)
{
path = line.c_str() + 1;
+ ::CharLower(const_cast<char*>(path.c_str()));
}
path.push_back('/');
|
@@ -42,6 +42,8 @@ fread(&relpath[0], sizeof(char), length, f);
relpath[length] = 0;
+ ::CharLowerBuff(&relpath[0], length);
+
return 1;
}
|
Loading...