summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2012-03-19 19:12:03 +0200
committerVadim ProductEngine <vsavchuk@productengine.com>2012-03-19 19:12:03 +0200
commit7b4d05894df0b9151dfcf95c3d70c652dc9b922c (patch)
tree891b0fa35c95fcf2eebf3711fab7d2481ea5998d /indra/newview
parentaa4ccff19f3f7e2a16509d4e31d7c69caeea96c1 (diff)
MAINT-141, MAINT-95, MAINT-62 FIXED Don't delete files using masks starting with "/".
Encountering such a mask will show a warning message and throw a debug assertion.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappviewer.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 5941dbc126..3368fdff57 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1512,7 +1512,6 @@ bool LLAppViewer::cleanup()
if (! isError())
{
std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "");
- logdir += gDirUtilp->getDirDelimiter();
gDirUtilp->deleteFilesInDir(logdir, "*-*-*-*-*.dmp");
}
@@ -1761,8 +1760,7 @@ bool LLAppViewer::cleanup()
if (mPurgeOnExit)
{
llinfos << "Purging all cache files on exit" << llendflush;
- std::string mask = gDirUtilp->getDirDelimiter() + "*.*";
- gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE,""),mask);
+ gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE,""), "*.*");
}
removeMarkerFile(); // Any crashes from here on we'll just have to ignore
@@ -2996,8 +2994,7 @@ void LLAppViewer::cleanupSavedSettings()
void LLAppViewer::removeCacheFiles(const std::string& file_mask)
{
- std::string mask = gDirUtilp->getDirDelimiter() + file_mask;
- gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""), mask);
+ gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""), file_mask);
}
void LLAppViewer::writeSystemInfo()
@@ -3856,8 +3853,7 @@ void LLAppViewer::purgeCache()
LL_INFOS("AppCache") << "Purging Cache and Texture Cache..." << LL_ENDL;
LLAppViewer::getTextureCache()->purgeCache(LL_PATH_CACHE);
LLVOCache::getInstance()->removeCache(LL_PATH_CACHE);
- std::string mask = "*.*";
- gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""), mask);
+ gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""), "*.*");
}
std::string LLAppViewer::getSecondLifeTitle() const