an actual fix for that last claim re: a buglet that used the wrong directory to store...
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 5 Jan 2007 21:15:11 +0000 (21:15 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Fri, 5 Jan 2007 21:15:11 +0000 (21:15 +0000)
git-svn-id: svn://localhost/ardour2/trunk@1277 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/session_state.cc

index 28d4a44174bd9e8243c24981fc8f499ad394f268..8a26de9be2234f77aeef890837655c5028d11ff1 100644 (file)
@@ -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;