use the loaded analysis path as the default save path
authorDiane Trout <diane@caltech.edu>
Fri, 15 Sep 2006 22:27:20 +0000 (22:27 +0000)
committerDiane Trout <diane@caltech.edu>
Fri, 15 Sep 2006 22:27:20 +0000 (22:27 +0000)
if no save location is specified for an analysis and we happen to have
an analysis location that we were loaded from, default to saving to the
same location.

alg/mussa.cpp

index ccba221f61ca45a8007906046ccd2a07209eb510..7226e43f2b6c26b732d527ccbc0b2e4905e9ded2 100644 (file)
@@ -530,7 +530,9 @@ Mussa::save(fs::path save_path)
   int dir_create_status;
 
   if (save_path.empty()) {
-    if (not analysis_name.empty()) {
+    if (not analysis_path.empty()) {
+      save_path = analysis_path;
+    } else if (not analysis_name.empty()) {
       std::string save_name = analysis_name;
        // gotta do bit with adding win & thres if to be appended
        if (win_append) {