diff options
Diffstat (limited to 'indra/llfilesystem/lldiriterator.cpp')
| -rw-r--r-- | indra/llfilesystem/lldiriterator.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/llfilesystem/lldiriterator.cpp b/indra/llfilesystem/lldiriterator.cpp index 61f768c512..a6eb4adf7f 100644 --- a/indra/llfilesystem/lldiriterator.cpp +++ b/indra/llfilesystem/lldiriterator.cpp @@ -52,7 +52,7 @@ LLDirIterator::Impl::Impl(const std::string &dirname, const std::string &mask) : mIsValid(false) { #ifdef LL_WINDOWS // or BOOST_WINDOWS_API - fs::path dir_path(utf8str_to_utf16str(dirname)); + fs::path dir_path(ll_convert<std::wstring>(dirname)); #else fs::path dir_path(dirname); #endif @@ -72,7 +72,11 @@ LLDirIterator::Impl::Impl(const std::string &dirname, const std::string &mask) if (!is_dir) { +#if LL_WINDOWS + LL_WARNS() << "Invalid path: \"" << utf16str_to_utf8str(dir_path.wstring()) << "\"" << LL_ENDL; +#else LL_WARNS() << "Invalid path: \"" << dir_path.string() << "\"" << LL_ENDL; +#endif return; } @@ -130,7 +134,11 @@ bool LLDirIterator::Impl::next(std::string &fname) while (mIter != end_itr && !found) { boost::smatch match; +#if LL_WINDOWS + std::string name = utf16str_to_utf8str(mIter->path().filename().wstring()); +#else std::string name = mIter->path().filename().string(); +#endif found = ll_regex_match(name, match, mFilterExp); if (found) { |
