diff options
author | Roxie Linden <roxie@lindenlab.com> | 2010-02-25 01:34:52 -0800 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2010-02-25 01:34:52 -0800 |
commit | c6163fafaac9c72683b11894ed309d1f55a745c8 (patch) | |
tree | 612be60185cbea598bdf907f045c9fc29fb40a2c /indra/llvfs/lldir.cpp | |
parent | 0bf246ed663ad11d316fe7898a3fee3f57676d4b (diff) | |
parent | 82de841c52357642d30b6d89b11da079f9c0f5d1 (diff) |
automated merge
Diffstat (limited to 'indra/llvfs/lldir.cpp')
-rw-r--r-- | indra/llvfs/lldir.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp index 296d827a20..1f0c4fe13a 100644 --- a/indra/llvfs/lldir.cpp +++ b/indra/llvfs/lldir.cpp @@ -200,6 +200,11 @@ const std::string &LLDir::getOSUserAppDir() const const std::string &LLDir::getLindenUserDir() const { + if (mLindenUserDir.empty()) + { + lldebugs << "getLindenUserDir() called early, we don't have the user name yet - returning empty string to caller" << llendl; + } + return mLindenUserDir; } @@ -337,7 +342,7 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd break; case LL_PATH_CACHE: - prefix = getCacheDir(); + prefix = getCacheDir(); break; case LL_PATH_USER_SETTINGS: @@ -348,6 +353,11 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd case LL_PATH_PER_SL_ACCOUNT: prefix = getLindenUserDir(); + if (prefix.empty()) + { + // if we're asking for the per-SL-account directory but we haven't logged in yet (or otherwise don't know the account name from which to build this string), then intentionally return a blank string to the caller and skip the below warning about a blank prefix. + return std::string(); + } break; case LL_PATH_CHAT_LOGS: @@ -557,7 +567,7 @@ std::string LLDir::getForbiddenFileChars() void LLDir::setLindenUserDir(const std::string &username) { - // if both first and last aren't set, assume we're grabbing the cached dir + // if the username isn't set, that's bad if (!username.empty()) { // some platforms have case-sensitive filesystems, so be |