diff options
| author | Vadim ProductEngine <vsavchuk@productengine.com> | 2012-03-19 19:12:03 +0200 | 
|---|---|---|
| committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2012-03-19 19:12:03 +0200 | 
| commit | 7b4d05894df0b9151dfcf95c3d70c652dc9b922c (patch) | |
| tree | 891b0fa35c95fcf2eebf3711fab7d2481ea5998d /indra/llvfs | |
| parent | aa4ccff19f3f7e2a16509d4e31d7c69caeea96c1 (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/llvfs')
| -rw-r--r-- | indra/llvfs/lldir.cpp | 7 | 
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))  	{ | 
