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