diff options
| author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-20 13:54:34 -0800 | 
|---|---|---|
| committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-20 13:54:34 -0800 | 
| commit | a65188d85f75e848d224bd335a00ed8aa51f945e (patch) | |
| tree | f43b390cba45d047fc0fa31659f6969f62b925d1 /indra/llvfs | |
| parent | 1a8008ea150d1eb9a8f4036988ef971fb1901cb3 (diff) | |
| parent | 5ca943cd0279d35ffdf584fa0de3b795645f276c (diff) | |
Merge from viewer2.  Minor conflict resolved.
Diffstat (limited to 'indra/llvfs')
| -rw-r--r-- | indra/llvfs/lldir.cpp | 15 | ||||
| -rw-r--r-- | indra/llvfs/lldir.h | 2 | ||||
| -rw-r--r-- | indra/llvfs/lldir_linux.cpp | 3 | ||||
| -rw-r--r-- | indra/llvfs/lldir_solaris.cpp | 2 | 
4 files changed, 17 insertions, 5 deletions
| diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp index b2b17fdd56..da4abde451 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 &first, const std::string &last)  { -	// if both first and last aren't set, assume we're grabbing the cached dir +	// if both first and last aren't set, that's bad.  	if (!first.empty() && !last.empty())  	{  		// some platforms have case-sensitive filesystems, so be @@ -571,6 +581,7 @@ void LLDir::setLindenUserDir(const std::string &first, const std::string &last)  		mLindenUserDir += firstlower;  		mLindenUserDir += "_";  		mLindenUserDir += lastlower; +		llinfos << "Got name for LLDir::setLindenUserDir(first='" << first << "', last='" << last << "')" << llendl;  	}  	else  	{ diff --git a/indra/llvfs/lldir.h b/indra/llvfs/lldir.h index 206e3223e3..9067d75bac 100644 --- a/indra/llvfs/lldir.h +++ b/indra/llvfs/lldir.h @@ -44,7 +44,7 @@ typedef enum ELLPath  	LL_PATH_NONE = 0,  	LL_PATH_USER_SETTINGS = 1,  	LL_PATH_APP_SETTINGS = 2,	 -	LL_PATH_PER_SL_ACCOUNT = 3,	 +	LL_PATH_PER_SL_ACCOUNT = 3, // returns/expands to blank string if we don't know the account name yet  	LL_PATH_CACHE = 4,	  	LL_PATH_CHARACTER = 5,	  	LL_PATH_HELP = 6,		 diff --git a/indra/llvfs/lldir_linux.cpp b/indra/llvfs/lldir_linux.cpp index ee902d1de7..a9736560ec 100644 --- a/indra/llvfs/lldir_linux.cpp +++ b/indra/llvfs/lldir_linux.cpp @@ -112,9 +112,10 @@ LLDir_Linux::LLDir_Linux()  		// ...normal installation running  		mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins";      }	 +  	mOSUserDir = getCurrentUserHome(tmp_str);  	mOSUserAppDir = ""; -	mLindenUserDir = tmp_str; +	mLindenUserDir = "";  	char path [32];	/* Flawfinder: ignore */  diff --git a/indra/llvfs/lldir_solaris.cpp b/indra/llvfs/lldir_solaris.cpp index a8fad8e5bd..8ac5a41e93 100644 --- a/indra/llvfs/lldir_solaris.cpp +++ b/indra/llvfs/lldir_solaris.cpp @@ -100,7 +100,7 @@ LLDir_Solaris::LLDir_Solaris()  	mAppRODataDir = strdup(tmp_str);  	mOSUserDir = getCurrentUserHome(tmp_str);  	mOSUserAppDir = ""; -	mLindenUserDir = tmp_str; +	mLindenUserDir = "";  	char path [LL_MAX_PATH];	/* Flawfinder: ignore */  | 
