summaryrefslogtreecommitdiff
path: root/indra/llvfs
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2012-04-26 14:04:55 -0400
committerNat Goodspeed <nat@lindenlab.com>2012-04-26 14:04:55 -0400
commit78f2663c4a61a7983c84cf50e5d2fdd92811a1b0 (patch)
tree56bf81cc39cb8c5180508c37c552c8ab23273300 /indra/llvfs
parentd6569db3520f7e0ce2d93febb6f4e26b48c08a3d (diff)
parent75c53a6a269890b9fe78b4b50d9b093a94778650 (diff)
Automated merge with http://hg.secondlife.com/viewer-release
Diffstat (limited to 'indra/llvfs')
-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))
{