# HG changeset patch # User Adrian Buehlmann <adr...@cadifra.com> # Date 1263566322 -3600 # Node ID 443d1dabb1992c1a97110d94a34088e97c75929c # Parent de6e0009b284e6a07cacdc177d9ba56a8f2c1307 shellext: Overlays: convert all incoming paths to lowercase
closes #867 diff --git a/win32/shellext/CShellExtOverlay.cpp b/win32/shellext/CShellExtOverlay.cpp --- a/win32/shellext/CShellExtOverlay.cpp +++ b/win32/shellext/CShellExtOverlay.cpp @@ -36,7 +36,10 @@ STDMETHODIMP CShellExtOverlay::IsMemberO if (GetRegistryConfig("EnableOverlays", cval) != 0 && cval == "0") return S_FALSE; - std::string path = WideToMultibyte(pwszPath); + 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())) diff --git a/win32/shellext/DirectoryStatus.cpp b/win32/shellext/DirectoryStatus.cpp --- a/win32/shellext/DirectoryStatus.cpp +++ b/win32/shellext/DirectoryStatus.cpp @@ -116,6 +116,7 @@ int DirectoryStatus::read(const std::str if (line.size() > 1) { path = line.c_str() + 1; + ::CharLower(const_cast<char*>(path.c_str())); } path.push_back('/'); diff --git a/win32/shellext/Direntry.cpp b/win32/shellext/Direntry.cpp --- a/win32/shellext/Direntry.cpp +++ b/win32/shellext/Direntry.cpp @@ -42,6 +42,8 @@ int Direntry::read(FILE* f, std::vector< fread(&relpath[0], sizeof(char), length, f); relpath[length] = 0; + ::CharLowerBuff(&relpath[0], length); + return 1; } ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ Tortoisehg-develop mailing list Tortoisehg-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop