From 80be4c1d2d73982ea2df6dd7ef3fc3465416c882 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Tue, 12 Aug 2008 17:29:50 +0000 Subject: QAR-767 Combined maint-render-7 and maint-viewer-9 merge merge release@93398 viewer-merge-1@94007 -> release dataserver-is-deprecated --- indra/llvfs/lldir.cpp | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) (limited to 'indra/llvfs/lldir.cpp') diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp index f4865202d5..325a2a39b6 100644 --- a/indra/llvfs/lldir.cpp +++ b/indra/llvfs/lldir.cpp @@ -59,8 +59,19 @@ LLDir_Linux gDirUtil; LLDir *gDirUtilp = (LLDir *)&gDirUtil; -LLDir::LLDir() -: mDirDelimiter("/") // fallback to forward slash if not overridden +LLDir::LLDir() +: mAppName(""), + mExecutablePathAndName(""), + mExecutableFilename(""), + mExecutableDir(""), + mAppRODataDir(""), + mOSUserDir(""), + mOSUserAppDir(""), + mLindenUserDir(""), + mOSCacheDir(""), + mCAFile(""), + mTempDir(""), + mDirDelimiter("/") // fallback to forward slash if not overridden { } @@ -205,13 +216,20 @@ const std::string LLDir::getCacheDir(bool get_default) const if (mCacheDir.empty() || get_default) { std::string res; - if (getOSUserAppDir().empty()) + if (getOSCacheDir().empty()) { - res = "data"; + if (getOSUserAppDir().empty()) + { + res = "data"; + } + else + { + res = getOSUserAppDir() + mDirDelimiter + "cache"; + } } else { - res = getOSUserAppDir() + mDirDelimiter + "cache"; + res = getOSCacheDir() + mDirDelimiter + "SecondLife"; } return res; } @@ -221,6 +239,12 @@ const std::string LLDir::getCacheDir(bool get_default) const } } +const std::string &LLDir::getOSCacheDir() const +{ + return mOSCacheDir; +} + + const std::string &LLDir::getCAFile() const { return mCAFile; @@ -350,6 +374,9 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd prefix += mDirDelimiter; prefix += "browser_profile"; break; + + case LL_PATH_EXECUTABLE: + prefix = getExecutableDir(); default: llassert(0); -- cgit v1.2.3