No longer include llerrorlegacy.h. Updated llstl to include deletion utilites.
This commit is contained in:
@@ -129,7 +129,7 @@ S32 LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask)
|
||||
// File masks starting with "/" will match nothing, so we consider them invalid.
|
||||
if (LLStringUtil::startsWith(mask, getDirDelimiter()))
|
||||
{
|
||||
llwarns << "Invalid file mask: " << mask << llendl;
|
||||
LL_WARNS() << "Invalid file mask: " << mask << LL_ENDL;
|
||||
llassert(!"Invalid file mask");
|
||||
}
|
||||
|
||||
@@ -154,12 +154,12 @@ S32 LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask)
|
||||
{
|
||||
retry_count++;
|
||||
result = errno;
|
||||
llwarns << "Problem removing " << fullpath << " - errorcode: "
|
||||
<< result << " attempt " << retry_count << llendl;
|
||||
LL_WARNS() << "Problem removing " << fullpath << " - errorcode: "
|
||||
<< result << " attempt " << retry_count << LL_ENDL;
|
||||
|
||||
if(retry_count >= 5)
|
||||
{
|
||||
llwarns << "Failed to remove " << fullpath << llendl ;
|
||||
LL_WARNS() << "Failed to remove " << fullpath << LL_ENDL ;
|
||||
return count ;
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ S32 LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask)
|
||||
{
|
||||
if (retry_count)
|
||||
{
|
||||
llwarns << "Successfully removed " << fullpath << llendl;
|
||||
LL_WARNS() << "Successfully removed " << fullpath << LL_ENDL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -179,7 +179,7 @@ S32 LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask)
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
llwarns << "Unable to remove some files from " + dirname << llendl;
|
||||
LL_WARNS() << "Unable to remove some files from " + dirname << LL_ENDL;
|
||||
}
|
||||
|
||||
return count;
|
||||
@@ -197,7 +197,7 @@ U32 LLDir::deleteDirAndContents(const std::string& dir_name)
|
||||
}
|
||||
catch(const boost::filesystem::filesystem_error& e)
|
||||
{
|
||||
llwarns << "boost::filesystem::remove_all(\"" + dir_name + "\") failed: '" + e.code().message() + "'" << llendl;
|
||||
LL_WARNS() << "boost::filesystem::remove_all(\"" + dir_name + "\") failed: '" + e.code().message() + "'" << LL_ENDL;
|
||||
}
|
||||
|
||||
return res;
|
||||
@@ -558,9 +558,9 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd
|
||||
|
||||
if (prefix.empty())
|
||||
{
|
||||
llwarns << ELLPathToString(location)
|
||||
LL_WARNS() << ELLPathToString(location)
|
||||
<< ", '" << subdir1 << "', '" << subdir2 << "', '" << in_filename
|
||||
<< "': prefix is empty, possible bad filename" << llendl;
|
||||
<< "': prefix is empty, possible bad filename" << LL_ENDL;
|
||||
}
|
||||
|
||||
std::string expanded_filename = add(add(prefix, subdir1), subdir2);
|
||||
@@ -704,7 +704,7 @@ void LLDir::setLindenUserDir(const std::string &grid, const std::string &first,
|
||||
}
|
||||
else
|
||||
{
|
||||
llerrs << "Invalid name for LLDir::setLindenUserDir" << llendl;
|
||||
LL_ERRS() << "Invalid name for LLDir::setLindenUserDir" << LL_ENDL;
|
||||
}
|
||||
|
||||
dumpCurrentDirectories();
|
||||
@@ -719,7 +719,7 @@ void LLDir::makePortable()
|
||||
{
|
||||
if (errno != EEXIST)
|
||||
{
|
||||
llwarns << "Couldn't create portable_viewer directory." << llendl;
|
||||
LL_WARNS() << "Couldn't create portable_viewer directory." << LL_ENDL;
|
||||
return; // Failed, don't mess anything up.
|
||||
}
|
||||
}
|
||||
@@ -729,7 +729,7 @@ void LLDir::makePortable()
|
||||
{
|
||||
if (errno != EEXIST)
|
||||
{
|
||||
llwarns << "Couldn't create portable_viewer cache and settings directories." << llendl;
|
||||
LL_WARNS() << "Couldn't create portable_viewer cache and settings directories." << LL_ENDL;
|
||||
return; // Failed, don't mess up the existing initialization.
|
||||
}
|
||||
}
|
||||
@@ -745,7 +745,7 @@ void LLDir::setChatLogsDir(const std::string &path)
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Invalid name for LLDir::setChatLogsDir" << llendl;
|
||||
LL_WARNS() << "Invalid name for LLDir::setChatLogsDir" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -769,7 +769,7 @@ void LLDir::setPerAccountChatLogsDir(const std::string &grid, const std::string
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Invalid name for LLDir::setPerAccountChatLogsDir" << llendl;
|
||||
LL_WARNS() << "Invalid name for LLDir::setPerAccountChatLogsDir" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -816,22 +816,22 @@ bool LLDir::setCacheDir(const std::string &path)
|
||||
|
||||
void LLDir::dumpCurrentDirectories()
|
||||
{
|
||||
LL_DEBUGS2("AppInit","Directories") << "Current Directories:" << LL_ENDL;
|
||||
LL_DEBUGS("AppInit","Directories") << "Current Directories:" << LL_ENDL;
|
||||
|
||||
LL_DEBUGS2("AppInit","Directories") << " CurPath: " << getCurPath() << LL_ENDL;
|
||||
LL_DEBUGS2("AppInit","Directories") << " AppName: " << getAppName() << LL_ENDL;
|
||||
LL_DEBUGS2("AppInit","Directories") << " ExecutableFilename: " << getExecutableFilename() << LL_ENDL;
|
||||
LL_DEBUGS2("AppInit","Directories") << " ExecutableDir: " << getExecutableDir() << LL_ENDL;
|
||||
LL_DEBUGS2("AppInit","Directories") << " ExecutablePathAndName: " << getExecutablePathAndName() << LL_ENDL;
|
||||
LL_DEBUGS2("AppInit","Directories") << " WorkingDir: " << getWorkingDir() << LL_ENDL;
|
||||
LL_DEBUGS2("AppInit","Directories") << " AppRODataDir: " << getAppRODataDir() << LL_ENDL;
|
||||
LL_DEBUGS2("AppInit","Directories") << " OSUserDir: " << getOSUserDir() << LL_ENDL;
|
||||
LL_DEBUGS2("AppInit","Directories") << " OSUserAppDir: " << getOSUserAppDir() << LL_ENDL;
|
||||
LL_DEBUGS2("AppInit","Directories") << " LindenUserDir: " << getLindenUserDir() << LL_ENDL;
|
||||
LL_DEBUGS2("AppInit","Directories") << " TempDir: " << getTempDir() << LL_ENDL;
|
||||
LL_DEBUGS2("AppInit","Directories") << " CAFile: " << getCAFile() << LL_ENDL;
|
||||
LL_DEBUGS2("AppInit","Directories") << " SkinBaseDir: " << getSkinBaseDir() << LL_ENDL;
|
||||
LL_DEBUGS2("AppInit","Directories") << " SkinDir: " << getSkinDir() << LL_ENDL;
|
||||
LL_DEBUGS("AppInit","Directories") << " CurPath: " << getCurPath() << LL_ENDL;
|
||||
LL_DEBUGS("AppInit","Directories") << " AppName: " << getAppName() << LL_ENDL;
|
||||
LL_DEBUGS("AppInit","Directories") << " ExecutableFilename: " << getExecutableFilename() << LL_ENDL;
|
||||
LL_DEBUGS("AppInit","Directories") << " ExecutableDir: " << getExecutableDir() << LL_ENDL;
|
||||
LL_DEBUGS("AppInit","Directories") << " ExecutablePathAndName: " << getExecutablePathAndName() << LL_ENDL;
|
||||
LL_DEBUGS("AppInit","Directories") << " WorkingDir: " << getWorkingDir() << LL_ENDL;
|
||||
LL_DEBUGS("AppInit","Directories") << " AppRODataDir: " << getAppRODataDir() << LL_ENDL;
|
||||
LL_DEBUGS("AppInit","Directories") << " OSUserDir: " << getOSUserDir() << LL_ENDL;
|
||||
LL_DEBUGS("AppInit","Directories") << " OSUserAppDir: " << getOSUserAppDir() << LL_ENDL;
|
||||
LL_DEBUGS("AppInit","Directories") << " LindenUserDir: " << getLindenUserDir() << LL_ENDL;
|
||||
LL_DEBUGS("AppInit","Directories") << " TempDir: " << getTempDir() << LL_ENDL;
|
||||
LL_DEBUGS("AppInit","Directories") << " CAFile: " << getCAFile() << LL_ENDL;
|
||||
LL_DEBUGS("AppInit","Directories") << " SkinBaseDir: " << getSkinBaseDir() << LL_ENDL;
|
||||
LL_DEBUGS("AppInit","Directories") << " SkinDir: " << getSkinDir() << LL_ENDL;
|
||||
}
|
||||
|
||||
std::string LLDir::add(const std::string& path, const std::string& name) const
|
||||
@@ -901,13 +901,13 @@ void dir_exists_or_crash(const std::string &dir_name)
|
||||
{
|
||||
if(0 != LLFile::mkdir(dir_name, 0700)) // octal
|
||||
{
|
||||
llerrs << "Unable to create directory: " << dir_name << llendl;
|
||||
LL_ERRS() << "Unable to create directory: " << dir_name << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
llerrs << "Unable to stat: " << dir_name << " errno = " << stat_rv
|
||||
<< llendl;
|
||||
LL_ERRS() << "Unable to stat: " << dir_name << " errno = " << stat_rv
|
||||
<< LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -915,7 +915,7 @@ void dir_exists_or_crash(const std::string &dir_name)
|
||||
// data_dir exists, make sure it's a directory.
|
||||
if(!S_ISDIR(dir_stat.st_mode))
|
||||
{
|
||||
llerrs << "Data directory collision: " << dir_name << llendl;
|
||||
LL_ERRS() << "Data directory collision: " << dir_name << LL_ENDL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user