summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-02-07 17:38:42 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-02-07 17:38:42 -0500
commitd47fe167e3c1dc44e4114227b0e8b83b40b35169 (patch)
tree084d917d8a5c777b173e4758664fadf3060cfab5 /libs
parentf715cd877c6a14a208052b4217a6a40f007da20a (diff)
when cleaning up sources, do not remove "stub" sources from the source list, even though they do not exist on disk yet; remove some debug output
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/session_state.cc36
1 files changed, 15 insertions, 21 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index 6d535b8e59..ffbe55afbf 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -987,19 +987,9 @@ Session::state (bool full_state)
if (!fs->destructive()) {
if (fs->empty() && !fs->used()) {
-#ifndef NDEBUG
- cerr << "DEBUG: source '"
- << fs->name() << "' id: "
- << fs->id() << " is marked as empty and unused and is not saved.\n";
-#endif
continue;
}
}
-#ifndef NDEBUG
- cerr << "DEBUG: saving source '"
- << fs->name() << "' id: "
- << fs->id() << ".\n";
-#endif
child->add_child_nocopy (siter->second->get_state());
}
@@ -2710,19 +2700,23 @@ Session::cleanup_sources (CleanupReport& rep)
++tmp;
if ((fs = boost::dynamic_pointer_cast<FileSource> (i->second)) != 0) {
- if (playlists->source_use_count (fs) != 0) {
- all_sources.insert (fs->path());
- } else {
- /* we might not remove this source from disk, because it may be used
- by other snapshots, but its not being used in this version
- so lets get rid of it now, along with any representative regions
- in the region list.
- */
+ if (!fs->is_stub()) {
- RegionFactory::remove_regions_using_source (i->second);
- sources.erase (i);
- }
+ if (playlists->source_use_count (fs) != 0) {
+ all_sources.insert (fs->path());
+ } else {
+
+ /* we might not remove this source from disk, because it may be used
+ by other snapshots, but its not being used in this version
+ so lets get rid of it now, along with any representative regions
+ in the region list.
+ */
+
+ RegionFactory::remove_regions_using_source (i->second);
+ sources.erase (i);
+ }
+ }
}
i = tmp;