From 798bf13c41eb8b60f75318bc4c33234b64fecb22 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 5 Jan 2007 21:15:11 +0000 Subject: [PATCH] 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 --- libs/ardour/session_state.cc | 20 +++++++++++++++----- 1 file 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; -- 2.30.2