diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-05-09 19:33:26 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-06-29 14:18:11 -0400 |
commit | 3a56004f65c3d61917e9452a6f54b685748856e1 (patch) | |
tree | 978f1413fda0f539e415013ae0be565b796681fb /libs/ardour/filesystem_paths.cc | |
parent | 4d64aed5d2253e7a5e0eab1c4d0ec158dd2e3ef1 (diff) |
fix crash caused by missing return; add explanatory comments
Diffstat (limited to 'libs/ardour/filesystem_paths.cc')
-rw-r--r-- | libs/ardour/filesystem_paths.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/ardour/filesystem_paths.cc b/libs/ardour/filesystem_paths.cc index 3452f10ba6..4dfac59bc3 100644 --- a/libs/ardour/filesystem_paths.cc +++ b/libs/ardour/filesystem_paths.cc @@ -49,17 +49,25 @@ user_config_directory_name (int version = -1) version = atoi (X_(PROGRAM_VERSION)); } + /* ARDOUR::Profile may not be available when this is + called, so rely on build-time detection of the + product name etc. + */ + #ifdef USE_TRACKS_CODE_FEATURES /* Tracks does not use versioned configuration folders, which may or may not be problematic in the future. */ - const string config_dir_name = X_(PROGRAM_NAME); + return X_(PROGRAM_NAME); + #else const string config_dir_name = string_compose ("%1%2", X_(PROGRAM_NAME), version); #if defined (__APPLE__) || defined (PLATFORM_WINDOWS) + /* Use mixed-case folder name on OS X and Windows */ return config_dir_name; #else + /* use lower case folder name on Linux */ return downcase (config_dir_name); #endif #endif |