diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2021-11-16 01:21:05 +0200 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2021-11-16 01:21:05 +0200 |
commit | 0bffd3d365023fea504b1070480e7b2f72080129 (patch) | |
tree | e11a931c690abe94ca1d7201a9375ea2ed8e1158 /indra/llfilesystem | |
parent | 3c2ccd879cb59ac0fdcacfab1fe68bc4dcefc68b (diff) | |
parent | 9957c28ddc5e5c129af2db662da7d69f1509af65 (diff) |
Merge branch 'master' into DRTVWR-519
# Conflicts:
# README.md
Diffstat (limited to 'indra/llfilesystem')
-rw-r--r-- | indra/llfilesystem/lldir.cpp | 10 | ||||
-rw-r--r-- | indra/llfilesystem/lldir.h | 3 | ||||
-rw-r--r-- | indra/llfilesystem/lldiriterator.cpp | 4 |
3 files changed, 15 insertions, 2 deletions
diff --git a/indra/llfilesystem/lldir.cpp b/indra/llfilesystem/lldir.cpp index 9e9abbadff..69b23f9cf8 100644 --- a/indra/llfilesystem/lldir.cpp +++ b/indra/llfilesystem/lldir.cpp @@ -337,6 +337,11 @@ const std::string &LLDir::getDumpDir() const return LLDir::sDumpDir; } +bool LLDir::dumpDirExists() const +{ + return !sDumpDir.empty(); +} + const std::string &LLDir::getPerAccountChatLogsDir() const { return mPerAccountChatLogsDir; @@ -888,6 +893,11 @@ std::string LLDir::getScrubbedFileName(const std::string uncleanFileName) return name; } +std::string LLDir::getDumpLogsDirPath(const std::string &file_name) +{ + return gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "dump_logs", file_name); +} + // static std::string LLDir::getForbiddenFileChars() { diff --git a/indra/llfilesystem/lldir.h b/indra/llfilesystem/lldir.h index 4988b9c6e3..b9a046ba33 100644 --- a/indra/llfilesystem/lldir.h +++ b/indra/llfilesystem/lldir.h @@ -90,6 +90,7 @@ class LLDir const std::string &getLindenUserDir() const; // Location of the Linden user dir. const std::string &getChatLogsDir() const; // Location of the chat logs dir. const std::string &getDumpDir() const; // Location of the per-run dump dir. + bool dumpDirExists() const; const std::string &getPerAccountChatLogsDir() const; // Location of the per account chat logs dir. const std::string &getTempDir() const; // Common temporary directory const std::string getCacheDir(bool get_default = false) const; // Location of the cache. @@ -174,6 +175,8 @@ class LLDir // random filename in common temporary directory std::string getTempFilename() const; + static std::string getDumpLogsDirPath(const std::string &file_name = ""); + // For producing safe download file names from potentially unsafe ones static std::string getScrubbedFileName(const std::string uncleanFileName); static std::string getForbiddenFileChars(); diff --git a/indra/llfilesystem/lldiriterator.cpp b/indra/llfilesystem/lldiriterator.cpp index 3eb64e69d9..f57bf4ebc6 100644 --- a/indra/llfilesystem/lldiriterator.cpp +++ b/indra/llfilesystem/lldiriterator.cpp @@ -27,8 +27,8 @@ #include "lldiriterator.h" #include "fix_macros.h" +#include "llregex.h" #include <boost/filesystem.hpp> -#include <boost/regex.hpp> namespace fs = boost::filesystem; @@ -131,7 +131,7 @@ bool LLDirIterator::Impl::next(std::string &fname) { boost::smatch match; std::string name = mIter->path().filename().string(); - found = boost::regex_match(name, match, mFilterExp); + found = ll_regex_match(name, match, mFilterExp); if (found) { fname = name; |