summaryrefslogtreecommitdiff
path: root/indra/llvfs/lldir.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-04-05 15:12:12 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-04-05 15:12:12 -0700
commita0a7b7ed16a9161b8060e8f32e5594356e5c7329 (patch)
tree06809cac6cde316219cbcbf58a7381d907a9d5e6 /indra/llvfs/lldir.cpp
parent6b3ca581e037d52e507a69d82fd6d900bd4641b7 (diff)
parent9bfc1c3b1060f15990bba218795a1ef6009d1535 (diff)
Merge
Diffstat (limited to 'indra/llvfs/lldir.cpp')
-rw-r--r--indra/llvfs/lldir.cpp39
1 files changed, 16 insertions, 23 deletions
diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp
index da4abde451..b4ee42ef3a 100644
--- a/indra/llvfs/lldir.cpp
+++ b/indra/llvfs/lldir.cpp
@@ -459,7 +459,6 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd
}
//llinfos << "*** EXPANDED FILENAME: <" << expanded_filename << ">" << llendl;
-
return expanded_filename;
}
@@ -565,27 +564,23 @@ std::string LLDir::getForbiddenFileChars()
return "\\/:*?\"<>|";
}
-void LLDir::setLindenUserDir(const std::string &first, const std::string &last)
+void LLDir::setLindenUserDir(const std::string &username)
{
- // if both first and last aren't set, that's bad.
- if (!first.empty() && !last.empty())
+ // if the username isn't set, that's bad
+ if (!username.empty())
{
// some platforms have case-sensitive filesystems, so be
// utterly consistent with our firstname/lastname case.
- std::string firstlower(first);
- LLStringUtil::toLower(firstlower);
- std::string lastlower(last);
- LLStringUtil::toLower(lastlower);
+ std::string userlower(username);
+ LLStringUtil::toLower(userlower);
+ LLStringUtil::replaceChar(userlower, ' ', '_');
mLindenUserDir = getOSUserAppDir();
mLindenUserDir += mDirDelimiter;
- mLindenUserDir += firstlower;
- mLindenUserDir += "_";
- mLindenUserDir += lastlower;
- llinfos << "Got name for LLDir::setLindenUserDir(first='" << first << "', last='" << last << "')" << llendl;
+ mLindenUserDir += userlower;
}
else
{
- llerrs << "Invalid name for LLDir::setLindenUserDir(first='" << first << "', last='" << last << "')" << llendl;
+ llerrs << "NULL name for LLDir::setLindenUserDir" << llendl;
}
dumpCurrentDirectories();
@@ -603,27 +598,25 @@ void LLDir::setChatLogsDir(const std::string &path)
}
}
-void LLDir::setPerAccountChatLogsDir(const std::string &first, const std::string &last)
+void LLDir::setPerAccountChatLogsDir(const std::string &username)
{
// if both first and last aren't set, assume we're grabbing the cached dir
- if (!first.empty() && !last.empty())
+ if (!username.empty())
{
// some platforms have case-sensitive filesystems, so be
// utterly consistent with our firstname/lastname case.
- std::string firstlower(first);
- LLStringUtil::toLower(firstlower);
- std::string lastlower(last);
- LLStringUtil::toLower(lastlower);
+ std::string userlower(username);
+ LLStringUtil::toLower(userlower);
+ LLStringUtil::replaceChar(userlower, ' ', '_');
mPerAccountChatLogsDir = getChatLogsDir();
mPerAccountChatLogsDir += mDirDelimiter;
- mPerAccountChatLogsDir += firstlower;
- mPerAccountChatLogsDir += "_";
- mPerAccountChatLogsDir += lastlower;
+ mPerAccountChatLogsDir += userlower;
}
else
{
- llwarns << "Invalid name for LLDir::setPerAccountChatLogsDir" << llendl;
+ llerrs << "NULL name for LLDir::setPerAccountChatLogsDir" << llendl;
}
+
}
void LLDir::setSkinFolder(const std::string &skin_folder)