diff options
author | Robin Gareus <robin@gareus.org> | 2014-12-23 23:04:38 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-12-23 23:43:25 +0100 |
commit | 96ee33aa5f086f3230db1a4de278b392c0c04ae8 (patch) | |
tree | 384544914c933fd6510cc0aa09e9ca82c2e9bbca /libs/ardour/filesystem_paths.cc | |
parent | 30c648f335980406ab236fc01ed0507935918085 (diff) |
fix and cleanup c404ef98 (windows config dir)
Diffstat (limited to 'libs/ardour/filesystem_paths.cc')
-rw-r--r-- | libs/ardour/filesystem_paths.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libs/ardour/filesystem_paths.cc b/libs/ardour/filesystem_paths.cc index 00ec2790f2..37104b01a1 100644 --- a/libs/ardour/filesystem_paths.cc +++ b/libs/ardour/filesystem_paths.cc @@ -49,19 +49,20 @@ user_config_directory () if (!p.empty()) return p; #ifdef __APPLE__ + p = Glib::build_filename (Glib::get_home_dir(), "Library/Preferences"); -#else - const char* c = 0; - /* adopt freedesktop standards, and put .ardour3 into $XDG_CONFIG_HOME or ~/.config - */ +#else + const char* c = 0; + /* adopt freedesktop standards, and put .ardour3 into $XDG_CONFIG_HOME or ~/.config */ if ((c = getenv ("XDG_CONFIG_HOME")) != 0) { p = c; } else { + #ifdef PLATFORM_WINDOWS // Not technically the home dir (since it needs to be a writable folder) - const string home_dir = Glib::build_filename (Glib::get_user_config_dir(), user_config_dir_name); + const string home_dir = Glib::get_user_config_dir(); #else const string home_dir = Glib::get_home_dir(); #endif @@ -69,17 +70,16 @@ user_config_directory () error << "Unable to determine home directory" << endmsg; exit (1); } + p = home_dir; #ifndef PLATFORM_WINDOWS - p = home_dir; p = Glib::build_filename (p, ".config"); #endif + } -#endif +#endif // end not __APPLE__ -#ifndef PLATFORM_WINDOWS p = Glib::build_filename (p, user_config_dir_name); -#endif if (!Glib::file_test (p, Glib::FILE_TEST_EXISTS)) { if (g_mkdir_with_parents (p.c_str(), 0755)) { |