aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llvfs/lldir_linux.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llvfs/lldir_linux.cpp')
-rw-r--r--linden/indra/llvfs/lldir_linux.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/linden/indra/llvfs/lldir_linux.cpp b/linden/indra/llvfs/lldir_linux.cpp
index 9aa4da3..481d23d 100644
--- a/linden/indra/llvfs/lldir_linux.cpp
+++ b/linden/indra/llvfs/lldir_linux.cpp
@@ -93,7 +93,11 @@ LLDir_Linux::LLDir_Linux()
93 mExecutablePathAndName = ""; 93 mExecutablePathAndName = "";
94 mExecutableDir = tmp_str; 94 mExecutableDir = tmp_str;
95 mWorkingDir = tmp_str; 95 mWorkingDir = tmp_str;
96#ifdef APP_RO_DATA_DIR
97 mAppRODataDir = APP_RO_DATA_DIR;
98#else
96 mAppRODataDir = tmp_str; 99 mAppRODataDir = tmp_str;
100#endif
97 mOSUserDir = getCurrentUserHome(tmp_str); 101 mOSUserDir = getCurrentUserHome(tmp_str);
98 mOSUserAppDir = ""; 102 mOSUserAppDir = "";
99 mLindenUserDir = tmp_str; 103 mLindenUserDir = tmp_str;
@@ -138,8 +142,8 @@ void LLDir_Linux::initAppDirs(const std::string &app_name)
138{ 142{
139 mAppName = app_name; 143 mAppName = app_name;
140 144
141 LLString upper_app_name(app_name); 145 std::string upper_app_name(app_name);
142 LLString::toUpper(upper_app_name); 146 LLStringUtil::toUpper(upper_app_name);
143 147
144 char* app_home_env = getenv((upper_app_name + "_USER_DIR").c_str()); /* Flawfinder: ignore */ 148 char* app_home_env = getenv((upper_app_name + "_USER_DIR").c_str()); /* Flawfinder: ignore */
145 if (app_home_env) 149 if (app_home_env)
@@ -153,14 +157,14 @@ void LLDir_Linux::initAppDirs(const std::string &app_name)
153 mOSUserAppDir = mOSUserDir; 157 mOSUserAppDir = mOSUserDir;
154 mOSUserAppDir += "/"; 158 mOSUserAppDir += "/";
155 mOSUserAppDir += "."; 159 mOSUserAppDir += ".";
156 LLString lower_app_name(app_name); 160 std::string lower_app_name(app_name);
157 LLString::toLower(lower_app_name); 161 LLStringUtil::toLower(lower_app_name);
158 mOSUserAppDir += lower_app_name; 162 mOSUserAppDir += lower_app_name;
159 } 163 }
160 164
161 // create any directories we expect to write to. 165 // create any directories we expect to write to.
162 166
163 int res = LLFile::mkdir(mOSUserAppDir.c_str()); 167 int res = LLFile::mkdir(mOSUserAppDir);
164 if (res == -1) 168 if (res == -1)
165 { 169 {
166 if (errno != EEXIST) 170 if (errno != EEXIST)
@@ -171,7 +175,7 @@ void LLDir_Linux::initAppDirs(const std::string &app_name)
171 } 175 }
172 } 176 }
173 177
174 res = LLFile::mkdir(getExpandedFilename(LL_PATH_LOGS,"").c_str()); 178 res = LLFile::mkdir(getExpandedFilename(LL_PATH_LOGS,""));
175 if (res == -1) 179 if (res == -1)
176 { 180 {
177 if (errno != EEXIST) 181 if (errno != EEXIST)
@@ -180,7 +184,7 @@ void LLDir_Linux::initAppDirs(const std::string &app_name)
180 } 184 }
181 } 185 }
182 186
183 res = LLFile::mkdir(getExpandedFilename(LL_PATH_USER_SETTINGS,"").c_str()); 187 res = LLFile::mkdir(getExpandedFilename(LL_PATH_USER_SETTINGS,""));
184 if (res == -1) 188 if (res == -1)
185 { 189 {
186 if (errno != EEXIST) 190 if (errno != EEXIST)
@@ -189,7 +193,7 @@ void LLDir_Linux::initAppDirs(const std::string &app_name)
189 } 193 }
190 } 194 }
191 195
192 res = LLFile::mkdir(getExpandedFilename(LL_PATH_CACHE,"").c_str()); 196 res = LLFile::mkdir(getExpandedFilename(LL_PATH_CACHE,""));
193 if (res == -1) 197 if (res == -1)
194 { 198 {
195 if (errno != EEXIST) 199 if (errno != EEXIST)
@@ -198,7 +202,7 @@ void LLDir_Linux::initAppDirs(const std::string &app_name)
198 } 202 }
199 } 203 }
200 204
201 res = LLFile::mkdir(getExpandedFilename(LL_PATH_MOZILLA_PROFILE,"").c_str()); 205 res = LLFile::mkdir(getExpandedFilename(LL_PATH_MOZILLA_PROFILE,""));
202 if (res == -1) 206 if (res == -1)
203 { 207 {
204 if (errno != EEXIST) 208 if (errno != EEXIST)