summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-01-05 21:15:11 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-01-05 21:15:11 +0000
commit798bf13c41eb8b60f75318bc4c33234b64fecb22 (patch)
tree60e84dfba6b51db1da7afa070d195b48cd357fff
parent87a5518eb1e2bbdf7e6bffed20d153cfa1eac87d (diff)
an actual fix for that last claim re: a buglet that used the wrong directory to store files in when cleaned up
git-svn-id: svn://localhost/ardour2/trunk@1277 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--libs/ardour/session_state.cc20
1 files changed, 15 insertions, 5 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index 28d4a44174..8a26de9be2 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -2607,12 +2607,22 @@ Session::cleanup_sources (Session::cleanup_report& rep)
on whichever filesystem it was already on.
*/
- /* XXX this is a hack ... go up 4 levels */
+ if (_path.find ("/sounds/")) {
- newpath = Glib::path_get_dirname (*x); // "audiofiles"
- newpath = Glib::path_get_dirname (newpath); // "session-name"
- newpath = Glib::path_get_dirname (newpath); // "interchange"
- newpath = Glib::path_get_dirname (newpath); // "session-dir"
+ /* old school, go up 1 level */
+
+ newpath = Glib::path_get_dirname (*x); // "sounds"
+ newpath = Glib::path_get_dirname (newpath); // "session-name"
+
+ } else {
+
+ /* new school, go up 4 levels */
+
+ newpath = Glib::path_get_dirname (*x); // "audiofiles"
+ newpath = Glib::path_get_dirname (newpath); // "session-name"
+ newpath = Glib::path_get_dirname (newpath); // "interchange"
+ newpath = Glib::path_get_dirname (newpath); // "session-dir"
+ }
newpath += '/';
newpath += dead_sound_dir_name;