diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2014-09-06 14:26:41 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2014-09-06 14:26:41 +0200 |
commit | 75205dd307c57df24d282b94f1bca3b668579c1e (patch) | |
tree | 0e9af30ffee9bb99df557909a01dba008c1d0fb2 /cutl/fs/path.ixx | |
parent | 1801a430cd5059b1220b48a1ecd58f0bbee7e4b6 (diff) |
Do not low-case paths in normalize() for Win32
Instead, do case-insensitive comparison. Also handle separators
while at it.
Diffstat (limited to 'cutl/fs/path.ixx')
-rw-r--r-- | cutl/fs/path.ixx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/cutl/fs/path.ixx b/cutl/fs/path.ixx index 80d3bb3..64d05a6 100644 --- a/cutl/fs/path.ixx +++ b/cutl/fs/path.ixx @@ -11,6 +11,22 @@ namespace cutl { namespace fs { +#ifdef _WIN32 + template <> + inline char path_traits<char>:: + tolower (char c) + { + return std::tolower (c); + } + + template <> + inline wchar_t path_traits<wchar_t>:: + tolower (wchar_t c) + { + return std::towlower (c); + } +#endif + template <typename C> inline bool basic_path<C>:: absolute () const @@ -51,21 +67,5 @@ namespace cutl return string (); } #endif - -#ifdef _WIN32 - template <> - inline char basic_path<char>:: - tolower (char c) - { - return std::tolower (c); - } - - template <> - inline wchar_t basic_path<wchar_t>:: - tolower (wchar_t c) - { - return std::towlower (c); - } -#endif } } |