Solving issue 681 completly : RT now search for an OS environment variable "RT_CACHE" first, in order to set the cache folder path (no "RawTherapeeXXX" subdirectory will be created). This variable is fully optional.
This commit is contained in:
@@ -640,6 +640,10 @@ void Options::load () {
|
||||
printf("SHGetSpecialFolderPathW: Fail!\n");
|
||||
}*/
|
||||
|
||||
dataPath = g_getenv("RT_CACHE");
|
||||
if (dataPath != NULL)
|
||||
rtdir = Glib::ustring(dataPath);
|
||||
else {
|
||||
dataPath = g_getenv("LOCALAPPDATA");
|
||||
if (dataPath != NULL)
|
||||
rtdir = Glib::ustring(dataPath) + Glib::ustring("\\") + Glib::ustring(CACHEFOLDERNAME);
|
||||
@@ -648,6 +652,7 @@ void Options::load () {
|
||||
if (dataPath != NULL)
|
||||
rtdir = Glib::ustring(dataPath) + Glib::ustring("\\Local Settings\\Application Data\\") + Glib::ustring(CACHEFOLDERNAME);
|
||||
}
|
||||
}
|
||||
#else
|
||||
rtdir = Glib::ustring(g_get_user_config_dir ()) + Glib::ustring("/") + Glib::ustring(CACHEFOLDERNAME);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user