do not reset paths for sources that are still outside the session after save-as

This commit is contained in:
Paul Davis 2015-04-21 00:18:49 -04:00
parent 4141d2113f
commit 847c9de7be

View file

@ -4262,12 +4262,15 @@ Session::save_as (SaveAs& saveas)
for (SourceMap::const_iterator i = sources.begin(); i != sources.end(); ++i) { for (SourceMap::const_iterator i = sources.begin(); i != sources.end(); ++i) {
boost::shared_ptr<FileSource> fs = boost::dynamic_pointer_cast<FileSource> (i->second); boost::shared_ptr<FileSource> fs = boost::dynamic_pointer_cast<FileSource> (i->second);
if (!fs) { if (!fs) {
continue; continue;
} }
string newpath = make_new_media_path (fs->path(), to_dir, new_folder); if (fs->within_session()) {
fs->set_path (newpath); string newpath = make_new_media_path (fs->path(), to_dir, new_folder);
fs->set_path (newpath);
}
} }
} }