Don't default WorkingDir to ExecutableDir if WorkingDir has "skins" and "app_settings" folder.
This allows the use of /indra/newview as WorkingDir to change skins and settings directly. Official LL Patch (except of the extra check for app_settings)master
parent
9d90b0203d
commit
5d6aaef6e5
|
|
@ -116,17 +116,16 @@ LLDir_Win32::LLDir_Win32()
|
|||
mExecutableDir = utf16str_to_utf8str(llutf16string(w_str));
|
||||
#endif
|
||||
|
||||
if (mExecutableDir.find("indra") == std::string::npos)
|
||||
{
|
||||
// Running from installed directory. Make sure current
|
||||
// directory isn't something crazy (e.g. if invoking from
|
||||
// command line).
|
||||
SetCurrentDirectory(utf8str_to_utf16str(mExecutableDir).c_str());
|
||||
GetCurrentDirectory(MAX_PATH, w_str);
|
||||
mWorkingDir = utf16str_to_utf8str(llutf16string(w_str));
|
||||
}
|
||||
|
||||
mAppRODataDir = mWorkingDir;
|
||||
|
||||
if(! LLFile::isdir(mAppRODataDir + mDirDelimiter + "skins") || ! LLFile::isdir(mAppRODataDir + mDirDelimiter + "app_settings"))
|
||||
{
|
||||
// What? No skins or app_settings in the working dir?
|
||||
// Try the executable's directory.
|
||||
mAppRODataDir = mExecutableDir;
|
||||
}
|
||||
|
||||
llinfos << "mAppRODataDir = " << mAppRODataDir << llendl;
|
||||
|
||||
mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins";
|
||||
|
|
|
|||
Loading…
Reference in New Issue