summaryrefslogtreecommitdiff
path: root/indra/llvfs/lldir.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2012-04-26 14:07:09 -0400
committerNat Goodspeed <nat@lindenlab.com>2012-04-26 14:07:09 -0400
commit0249a0d1e7564d06eadb8a23b0f058008dfd6068 (patch)
tree3553c0ca29f860279fb363e1a62c00158a35dca3 /indra/llvfs/lldir.cpp
parentd6569db3520f7e0ce2d93febb6f4e26b48c08a3d (diff)
parent6d3be57d334f02f4781dcaede9746976bd3643a4 (diff)
Automated merge with http://hg.secondlife.com/viewer-release
Diffstat (limited to 'indra/llvfs/lldir.cpp')
-rw-r--r--indra/llvfs/lldir.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp
index f3ac17d612..32d081d552 100644
--- a/indra/llvfs/lldir.cpp
+++ b/indra/llvfs/lldir.cpp
@@ -86,6 +86,13 @@ S32 LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask)
std::string fullpath;
S32 result;
+ // File masks starting with "/" will match nothing, so we consider them invalid.
+ if (LLStringUtil::startsWith(mask, getDirDelimiter()))
+ {
+ llwarns << "Invalid file mask: " << mask << llendl;
+ llassert(!"Invalid file mask");
+ }
+
LLDirIterator iter(dirname, mask);
while (iter.next(filename))
{