From 847c9de7be177725134f230dafa6147ebfafb944 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 21 Apr 2015 00:18:49 -0400 Subject: [PATCH] do not reset paths for sources that are still outside the session after save-as --- libs/ardour/session_state.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 3ab6ff09b5..32b6e28c47 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -4262,12 +4262,15 @@ Session::save_as (SaveAs& saveas) for (SourceMap::const_iterator i = sources.begin(); i != sources.end(); ++i) { boost::shared_ptr fs = boost::dynamic_pointer_cast (i->second); + if (!fs) { continue; } - string newpath = make_new_media_path (fs->path(), to_dir, new_folder); - fs->set_path (newpath); + if (fs->within_session()) { + string newpath = make_new_media_path (fs->path(), to_dir, new_folder); + fs->set_path (newpath); + } } }