diff --git a/rtgui/main.cc b/rtgui/main.cc index 1c9fb21e1..48c112f19 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -35,6 +35,8 @@ #ifndef WIN32 #include #include +#include +#include #endif #include @@ -93,6 +95,12 @@ int main(int argc, char **argv) Options::load (); +#ifndef _WIN32 + // Move the old path to the new one if the new does not exist + if (Glib::file_test(Glib::build_filename(options.rtdir,"cache"), Glib::FILE_TEST_IS_DIR) && !Glib::file_test(options.cacheBaseDir, Glib::FILE_TEST_IS_DIR)) + ::g_rename(Glib::build_filename(options.rtdir,"cache").c_str(), options.cacheBaseDir.c_str()); +#endif + // Gtk::RC::add_default_file (argv0+"/themes/"+options.theme); std::vector rcfiles; rcfiles.push_back (argv0+"/themes/"+options.theme);