diff options
| author | Xiaohong Bao <bao@lindenlab.com> | 2011-02-23 11:10:13 -0700 |
|---|---|---|
| committer | Xiaohong Bao <bao@lindenlab.com> | 2011-02-23 11:10:13 -0700 |
| commit | bfa25219b899636db74bedc258bc763caf91ddf0 (patch) | |
| tree | d9d82b63d9d5d3d784b4bee852f9caed2c897a71 /indra/llvfs/lldir.cpp | |
| parent | bcb5b209d1813681202524362dd186c8b0982357 (diff) | |
| parent | 01cdeb0cdd8c48b76a229d42ced4e5563cd18c5c (diff) | |
Automated merge with ssh://hg.lindenlab.com/bao/private-memory-pool
Diffstat (limited to 'indra/llvfs/lldir.cpp')
| -rw-r--r-- | indra/llvfs/lldir.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp index 938fb008c9..cb898e385f 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++; } @@ -382,11 +389,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: |
