summaryrefslogtreecommitdiff
path: root/libs/ardour/filesystem_paths.cc
diff options
context:
space:
mode:
authorJohn Emmas <johne53@tiscali.co.uk>2014-03-19 13:42:58 +0000
committerJohn Emmas <johne53@tiscali.co.uk>2014-03-19 13:42:58 +0000
commit6b92b1787e12f42e7eeee118aa48216841c5a614 (patch)
tree39ca5676486c1a75fa40888bd9136b77a050fd4c /libs/ardour/filesystem_paths.cc
parent2952ac05e65d7d7e8ad32263c247edeb3becb698 (diff)
Modify 'ardour_config_search_path()' and 'ardour_data_search_path()'
1) So that the Windows version will use appropriate environment variables (if they exist) 2) So that we don't exit if the env vars can't be found (we can still return some kind of path so just alert the user)
Diffstat (limited to 'libs/ardour/filesystem_paths.cc')
-rw-r--r--libs/ardour/filesystem_paths.cc20
1 files changed, 8 insertions, 12 deletions
diff --git a/libs/ardour/filesystem_paths.cc b/libs/ardour/filesystem_paths.cc
index d889076717..78232b16cd 100644
--- a/libs/ardour/filesystem_paths.cc
+++ b/libs/ardour/filesystem_paths.cc
@@ -193,15 +193,13 @@ ardour_config_search_path ()
search_path += user_config_directory();
#ifdef PLATFORM_WINDOWS
search_path += windows_search_path ();
-#else
+#endif
std::string s = Glib::getenv("ARDOUR_CONFIG_PATH");
if (s.empty()) {
- std::cerr << _("ARDOUR_CONFIG_PATH not set in environment - exiting\n");
- ::exit (1);
+ std::cerr << _("ARDOUR_CONFIG_PATH not set in environment\n");
+ } else {
+ search_path += Searchpath (s);
}
-
- search_path += Searchpath (s);
-#endif
}
return search_path;
@@ -216,15 +214,13 @@ ardour_data_search_path ()
search_path += user_config_directory();
#ifdef PLATFORM_WINDOWS
search_path += windows_search_path ();
-#else
+#endif
std::string s = Glib::getenv("ARDOUR_DATA_PATH");
if (s.empty()) {
- std::cerr << _("ARDOUR_DATA_PATH not set in environment - exiting\n");
- ::exit (1);
+ std::cerr << _("ARDOUR_DATA_PATH not set in environment\n");
+ } else {
+ search_path += Searchpath (s);
}
-
- search_path += Searchpath (s);
-#endif
}
return search_path;