diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-02-07 19:00:44 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-02-07 19:00:44 -0500 |
commit | 2a7ed69c28c5c4606ff13b3605b9bc9c3eba607d (patch) | |
tree | 8bc1cbb9df7bab6bafac672d11ce6e63f3a8542d /libs/ardour/file_source.cc | |
parent | 89d5be353addf41e0d6cdf5c70cdc988a0c3d19a (diff) | |
parent | d47fe167e3c1dc44e4114227b0e8b83b40b35169 (diff) |
merge with master, with minor conflict fixes
Diffstat (limited to 'libs/ardour/file_source.cc')
-rw-r--r-- | libs/ardour/file_source.cc | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/libs/ardour/file_source.cc b/libs/ardour/file_source.cc index e06b3d624e..39b6688113 100644 --- a/libs/ardour/file_source.cc +++ b/libs/ardour/file_source.cc @@ -101,7 +101,7 @@ FileSource::removable () const { bool r = ((_flags & Removable) && ((_flags & RemoveAtDestroy) || - ((_flags & RemovableIfEmpty) && empty() == 0))); + ((_flags & RemovableIfEmpty) && empty()))); return r; } @@ -581,3 +581,21 @@ FileSource::inc_use_count () Source::inc_use_count (); } +bool +FileSource::is_stub () const +{ + if (!empty()) { + return false; + } + + if (!removable()) { + return false; + } + + if (Glib::file_test (_path, Glib::FILE_TEST_EXISTS)) { + return false; + } + + return true; +} + |