summaryrefslogtreecommitdiff
path: root/indra/llvfs/lldir.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2010-12-15 17:20:58 -0700
committerXiaohong Bao <bao@lindenlab.com>2010-12-15 17:20:58 -0700
commit57065fe5a9521158b79b7a313d6476b8dcaa13a5 (patch)
treea466621b88948fa764774d61e1231ce327998961 /indra/llvfs/lldir.cpp
parentda244c7cce6b3d84b011a87cbcabffb51abb3fc8 (diff)
fix for SH-367: mesh viewer lock up: Problem removing object.cache - errorcode: 13
Diffstat (limited to 'indra/llvfs/lldir.cpp')
-rw-r--r--indra/llvfs/lldir.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp
index 938fb008c9..1a1f52df50 100644
--- a/indra/llvfs/lldir.cpp
+++ b/indra/llvfs/lldir.cpp
@@ -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++;
}