aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llvfs/lldir_win32.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llvfs/lldir_win32.cpp')
-rw-r--r--linden/indra/llvfs/lldir_win32.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/linden/indra/llvfs/lldir_win32.cpp b/linden/indra/llvfs/lldir_win32.cpp
index 8904dff..99d5e18 100644
--- a/linden/indra/llvfs/lldir_win32.cpp
+++ b/linden/indra/llvfs/lldir_win32.cpp
@@ -116,10 +116,16 @@ LLDir_Win32::LLDir_Win32()
116 GetCurrentDirectory(MAX_PATH, w_str); 116 GetCurrentDirectory(MAX_PATH, w_str);
117 mExecutableDir = utf16str_to_utf8str(llutf16string(w_str)); 117 mExecutableDir = utf16str_to_utf8str(llutf16string(w_str));
118#endif 118#endif
119
120 mAppRODataDir = getCurPath();
121 // *FIX:Mani - The following is the old way we did things. I'm keeping this around
122 // in case there is some really good reason to make mAppRODataDir == mExecutableDir
123 /*
119 if (strstr(mExecutableDir.c_str(), "indra\\newview")) 124 if (strstr(mExecutableDir.c_str(), "indra\\newview"))
120 mAppRODataDir = getCurPath(); 125 mAppRODataDir = getCurPath();
121 else 126 else
122 mAppRODataDir = mExecutableDir; 127 mAppRODataDir = mExecutableDir;
128 */
123} 129}
124 130
125LLDir_Win32::~LLDir_Win32() 131LLDir_Win32::~LLDir_Win32()
@@ -135,7 +141,7 @@ void LLDir_Win32::initAppDirs(const std::string &app_name)
135 mOSUserAppDir += "\\"; 141 mOSUserAppDir += "\\";
136 mOSUserAppDir += app_name; 142 mOSUserAppDir += app_name;
137 143
138 int res = LLFile::mkdir(mOSUserAppDir.c_str()); 144 int res = LLFile::mkdir(mOSUserAppDir);
139 if (res == -1) 145 if (res == -1)
140 { 146 {
141 if (errno != EEXIST) 147 if (errno != EEXIST)
@@ -147,7 +153,7 @@ void LLDir_Win32::initAppDirs(const std::string &app_name)
147 } 153 }
148 //dumpCurrentDirectories(); 154 //dumpCurrentDirectories();
149 155
150 res = LLFile::mkdir(getExpandedFilename(LL_PATH_LOGS,"").c_str()); 156 res = LLFile::mkdir(getExpandedFilename(LL_PATH_LOGS,""));
151 if (res == -1) 157 if (res == -1)
152 { 158 {
153 if (errno != EEXIST) 159 if (errno != EEXIST)
@@ -156,7 +162,7 @@ void LLDir_Win32::initAppDirs(const std::string &app_name)
156 } 162 }
157 } 163 }
158 164
159 res = LLFile::mkdir(getExpandedFilename(LL_PATH_USER_SETTINGS,"").c_str()); 165 res = LLFile::mkdir(getExpandedFilename(LL_PATH_USER_SETTINGS,""));
160 if (res == -1) 166 if (res == -1)
161 { 167 {
162 if (errno != EEXIST) 168 if (errno != EEXIST)
@@ -165,7 +171,7 @@ void LLDir_Win32::initAppDirs(const std::string &app_name)
165 } 171 }
166 } 172 }
167 173
168 res = LLFile::mkdir(getExpandedFilename(LL_PATH_CACHE,"").c_str()); 174 res = LLFile::mkdir(getExpandedFilename(LL_PATH_CACHE,""));
169 if (res == -1) 175 if (res == -1)
170 { 176 {
171 if (errno != EEXIST) 177 if (errno != EEXIST)
@@ -174,7 +180,7 @@ void LLDir_Win32::initAppDirs(const std::string &app_name)
174 } 180 }
175 } 181 }
176 182
177 res = LLFile::mkdir(getExpandedFilename(LL_PATH_MOZILLA_PROFILE,"").c_str()); 183 res = LLFile::mkdir(getExpandedFilename(LL_PATH_MOZILLA_PROFILE,""));
178 if (res == -1) 184 if (res == -1)
179 { 185 {
180 if (errno != EEXIST) 186 if (errno != EEXIST)
@@ -343,7 +349,7 @@ BOOL LLDir_Win32::fileExists(const std::string &filename) const
343 llstat stat_data; 349 llstat stat_data;
344 // Check the age of the file 350 // Check the age of the file
345 // Now, we see if the files we've gathered are recent... 351 // Now, we see if the files we've gathered are recent...
346 int res = LLFile::stat(filename.c_str(), &stat_data); 352 int res = LLFile::stat(filename, &stat_data);
347 if (!res) 353 if (!res)
348 { 354 {
349 return TRUE; 355 return TRUE;