use the loaded analysis path as the default save path
[mussa.git] / 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) {