diff options
author | Ankur Ahlawat <anchor@lindenlab.com> | 2017-11-16 01:59:00 -0800 |
---|---|---|
committer | Ankur Ahlawat <anchor@lindenlab.com> | 2017-11-16 01:59:00 -0800 |
commit | 93100236ae34eaa9cd3fa314e7e770339c13eba7 (patch) | |
tree | e384d0f81f46900a95a33d0b6b92cbf285e624bf /indra/llvfs | |
parent | a416dee2cc8c802bba24803c43805fd7fa0f484c (diff) | |
parent | b6d22de58850fc9a5b34eeb5b7930e5845bfc42d (diff) |
Merged lindenlab/viewer-release into default
Diffstat (limited to 'indra/llvfs')
-rw-r--r-- | indra/llvfs/lldir.cpp | 16 | ||||
-rw-r--r-- | indra/llvfs/lldiriterator.cpp | 4 |
2 files changed, 17 insertions, 3 deletions
diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp index 924e1166ee..b845de71fa 100644 --- a/indra/llvfs/lldir.cpp +++ b/indra/llvfs/lldir.cpp @@ -104,8 +104,13 @@ LLDir::~LLDir() std::vector<std::string> LLDir::getFilesInDir(const std::string &dirname) { //Returns a vector of fullpath filenames. - - boost::filesystem::path p (dirname); + +#ifdef LL_WINDOWS // or BOOST_WINDOWS_API + boost::filesystem::path p(utf8str_to_utf16str(dirname)); +#else + boost::filesystem::path p(dirname); +#endif + std::vector<std::string> v; if (exists(p)) @@ -193,7 +198,12 @@ U32 LLDir::deleteDirAndContents(const std::string& dir_name) try { - boost::filesystem::path dir_path(dir_name); +#ifdef LL_WINDOWS // or BOOST_WINDOWS_API + boost::filesystem::path dir_path(utf8str_to_utf16str(dir_name)); +#else + boost::filesystem::path dir_path(dir_name); +#endif + if (boost::filesystem::exists (dir_path)) { if (!boost::filesystem::is_empty (dir_path)) diff --git a/indra/llvfs/lldiriterator.cpp b/indra/llvfs/lldiriterator.cpp index 76296ff877..3eb64e69d9 100644 --- a/indra/llvfs/lldiriterator.cpp +++ b/indra/llvfs/lldiriterator.cpp @@ -51,7 +51,11 @@ private: 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)); +#else fs::path dir_path(dirname); +#endif bool is_dir = false; |