fix crash caused by missing return; add explanatory comments
authorPaul Davis <paul@linuxaudiosystems.com>
Sat, 9 May 2015 23:33:26 +0000 (19:33 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 29 Jun 2015 18:18:11 +0000 (14:18 -0400)
libs/ardour/filesystem_paths.cc

index 3452f10ba6d61dd277f673a9ae85f4a3e9fa82c3..4dfac59bc331a54deda7d8fd924fa004ca1b91ee 100644 (file)
@@ -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