FIRE-8226: Separate caches between Havok and OpenSim versions, clean up old code in lldir_mac.cpp

master
Cinders 2013-07-11 19:40:56 -06:00
parent 66ed6bb7fe
commit ce73bbe4cc
2 changed files with 6 additions and 42 deletions

View File

@ -296,7 +296,13 @@ std::string LLDir::buildSLOSCacheDir() const
}
else
{
// <FS:CR> FIRE-8226 - Different flavoured cache directories.
#ifdef OPENSIM
res = add(getOSCacheDir(), "FirestormOS");
#else
res = add(getOSCacheDir(), "Firestorm");
#endif // OPENSIM
// </FS:CR>
}
return res;
}

View File

@ -63,21 +63,6 @@ static bool CreateDirectory(const std::string &parent,
LLDir_Mac::LLDir_Mac()
{
mDirDelimiter = "/";
mCurrentDirIndex = -1;
mCurrentDirCount = -1;
//CFBundleRef mainBundleRef = NULL;
//CFURLRef executableURLRef = NULL;
//CFStringRef stringRef = NULL;
//OSStatus error = noErr;
//FSRef fileRef;
//CFStringRef secondLifeString = CFSTR("Firestorm");
//mainBundleRef = CFBundleGetMainBundle();
//executableURLRef = CFBundleCopyExecutableURL(mainBundleRef);
//if (executableURLRef != NULL)
const std::string secondLifeString = "Firestorm";
@ -148,33 +133,6 @@ LLDir_Mac::LLDir_Mac()
if (cachedir)
{
#if 0 // <FS:TS> Merge testing
FSRef newFileRef;
// Create the directory
error = CFCreateDirectory(&fileRef, secondLifeString, &newFileRef);
if (error == noErr)
{
// Save the full path to the folder
FSRefToLLString(&newFileRef, mOSUserDir);
// Create our sub-dirs
(void) CFCreateDirectory(&newFileRef, CFSTR("data"), NULL);
//(void) CFCreateDirectory(&newFileRef, CFSTR("cache"), NULL);
(void) CFCreateDirectory(&newFileRef, CFSTR("logs"), NULL);
(void) CFCreateDirectory(&newFileRef, CFSTR("user_settings"), NULL);
(void) CFCreateDirectory(&newFileRef, CFSTR("browser_profile"), NULL);
}
}
//mOSCacheDir
FSRef cacheDirRef;
error = FSFindFolder(kUserDomain, kCachedDataFolderType, true, &cacheDirRef);
if (error == noErr)
{
FSRefToLLString(&cacheDirRef, mOSCacheDir);
(void)CFCreateDirectory(&cacheDirRef, CFSTR("Firestorm"),NULL);
#endif
mOSCacheDir = *cachedir;
//SPATTERS TODO: This changes from ~/Library/Cache/Secondlife to ~/Library/Cache/com.app.secondlife/Secondlife. Last dir level could go away.
CreateDirectory(mOSCacheDir, secondLifeString, NULL);