summaryrefslogtreecommitdiff
path: root/indra/llvfs/lldir.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-04-02 07:07:49 -0400
committerOz Linden <oz@lindenlab.com>2011-04-02 07:07:49 -0400
commite58c809a5816383674d0f1957440fad728e88893 (patch)
tree83f1ff2c4bee8237c4557793143b2133623943a4 /indra/llvfs/lldir.cpp
parentf9af1f4fca028709b0262c0e8c40eefc2ab13d00 (diff)
parente6c0615b97019cf9c8aee267513757c0c2510420 (diff)
merge changes for STORM-1131
Diffstat (limited to 'indra/llvfs/lldir.cpp')
-rw-r--r--indra/llvfs/lldir.cpp27
1 files changed, 17 insertions, 10 deletions
diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp
index 938fb008c9..341c96f6ea 100644
--- a/indra/llvfs/lldir.cpp
+++ b/indra/llvfs/lldir.cpp
@@ -83,7 +83,7 @@ S32 LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask)
std::string filename;
std::string fullpath;
S32 result;
- while (getNextFileInDir(dirname, mask, filename, FALSE))
+ while (getNextFileInDir(dirname, mask, filename))
{
fullpath = dirname;
fullpath += getDirDelimiter();
@@ -101,10 +101,18 @@ S32 LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask)
{
if (0 != LLFile::remove(fullpath))
{
+ retry_count++;
result = errno;
llwarns << "Problem removing " << fullpath << " - errorcode: "
<< result << " attempt " << retry_count << llendl;
- ms_sleep(1000);
+
+ if(retry_count >= 5)
+ {
+ llwarns << "Failed to remove " << fullpath << llendl ;
+ return count ;
+ }
+
+ ms_sleep(100);
}
else
{
@@ -113,8 +121,7 @@ S32 LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask)
llwarns << "Successfully removed " << fullpath << llendl;
}
break;
- }
- retry_count++;
+ }
}
count++;
}
@@ -142,7 +149,11 @@ const std::string LLDir::findFile(const std::string& filename, const std::vector
{
if (!search_path_iter->empty())
{
- std::string filename_and_path = (*search_path_iter) + getDirDelimiter() + filename;
+ std::string filename_and_path = (*search_path_iter);
+ if (!filename.empty())
+ {
+ filename_and_path += getDirDelimiter() + filename;
+ }
if (fileExists(filename_and_path))
{
return filename_and_path;
@@ -382,11 +393,7 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd
break;
case LL_PATH_USER_SKIN:
- prefix = getOSUserAppDir();
- prefix += mDirDelimiter;
- prefix += "user_settings";
- prefix += mDirDelimiter;
- prefix += "skins";
+ prefix = getUserSkinDir();
break;
case LL_PATH_SKINS: