From b3c39a47e76f595fd953d9ccffc58b0dfb8359db Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Thu, 10 Sep 2009 02:38:36 -0500 Subject: Updated Grid Manager from Meerkat's SVN (as of r215). --- linden/indra/llvfs/lldir.cpp | 12 ++++++++++-- linden/indra/llvfs/lldir.h | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'linden/indra/llvfs') diff --git a/linden/indra/llvfs/lldir.cpp b/linden/indra/llvfs/lldir.cpp index 1dc00dd..c9af311 100644 --- a/linden/indra/llvfs/lldir.cpp +++ b/linden/indra/llvfs/lldir.cpp @@ -520,19 +520,23 @@ std::string LLDir::getForbiddenFileChars() return "\\/:*?\"<>|"; } -void LLDir::setLindenUserDir(const std::string &first, const std::string &last) +void LLDir::setLindenUserDir(const std::string &grid, const std::string &first, const std::string &last) { // if both first and last aren't set, assume we're grabbing the cached dir if (!first.empty() && !last.empty()) { // some platforms have case-sensitive filesystems, so be // utterly consistent with our firstname/lastname case. + std::string gridlower(grid); + LLStringUtil::toLower(gridlower); std::string firstlower(first); LLStringUtil::toLower(firstlower); std::string lastlower(last); LLStringUtil::toLower(lastlower); mLindenUserDir = getOSUserAppDir(); mLindenUserDir += mDirDelimiter; + mLindenUserDir += gridlower; + mLindenUserDir += "-"; mLindenUserDir += firstlower; mLindenUserDir += "_"; mLindenUserDir += lastlower; @@ -557,19 +561,23 @@ void LLDir::setChatLogsDir(const std::string &path) } } -void LLDir::setPerAccountChatLogsDir(const std::string &first, const std::string &last) +void LLDir::setPerAccountChatLogsDir(const std::string &grid, const std::string &first, const std::string &last) { // if both first and last aren't set, assume we're grabbing the cached dir if (!first.empty() && !last.empty()) { // some platforms have case-sensitive filesystems, so be // utterly consistent with our firstname/lastname case. + std::string gridlower(grid); + LLStringUtil::toLower(gridlower); std::string firstlower(first); LLStringUtil::toLower(firstlower); std::string lastlower(last); LLStringUtil::toLower(lastlower); mPerAccountChatLogsDir = getChatLogsDir(); mPerAccountChatLogsDir += mDirDelimiter; + mPerAccountChatLogsDir += gridlower; + mPerAccountChatLogsDir += "-"; mPerAccountChatLogsDir += firstlower; mPerAccountChatLogsDir += "_"; mPerAccountChatLogsDir += lastlower; diff --git a/linden/indra/llvfs/lldir.h b/linden/indra/llvfs/lldir.h index b041afc..4ab5d85 100644 --- a/linden/indra/llvfs/lldir.h +++ b/linden/indra/llvfs/lldir.h @@ -119,8 +119,8 @@ class LLDir static std::string getForbiddenFileChars(); virtual void setChatLogsDir(const std::string &path); // Set the chat logs dir to this user's dir - virtual void setPerAccountChatLogsDir(const std::string &first, const std::string &last); // Set the per user chat log directory. - virtual void setLindenUserDir(const std::string &first, const std::string &last); // Set the linden user dir to this user's dir + virtual void setPerAccountChatLogsDir(const std::string &grid, const std::string &first, const std::string &last); // Set the per user chat log directory. + virtual void setLindenUserDir(const std::string &grid, const std::string &first, const std::string &last); // Set the linden user dir to this user's dir virtual void setSkinFolder(const std::string &skin_folder); virtual bool setCacheDir(const std::string &path); -- cgit v1.1