diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-04-14 03:03:35 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-04-14 03:03:35 -0400 |
commit | 5764970709f15e85ec30c9cea89c318eb8114c58 (patch) | |
tree | 0e3ea92a0c26c3582ca31be5e9c48c3b4218aff4 /libs/ardour/smf_source.cc | |
parent | 062dd5b71d4aad9e8e83d51bf9277293cddaa2c2 (diff) |
more work on linking file existence and removability
Diffstat (limited to 'libs/ardour/smf_source.cc')
-rw-r--r-- | libs/ardour/smf_source.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/ardour/smf_source.cc b/libs/ardour/smf_source.cc index e15bc9a238..812e06c27b 100644 --- a/libs/ardour/smf_source.cc +++ b/libs/ardour/smf_source.cc @@ -63,9 +63,12 @@ SMFSource::SMFSource (Session& s, const string& path, Source::Flag flags) { /* note that origin remains empty */ - if (init(_path, false)) { + if (init (_path, false)) { throw failed_constructor (); } + + assert (!Glib::file_test (_path, Glib::FILE_TEST_EXISTS)); + existence_check (); /* file is not opened until write */ @@ -94,10 +97,13 @@ SMFSource::SMFSource (Session& s, const XMLNode& node, bool must_exist) throw failed_constructor (); } - if (init(_path, true)) { + if (init (_path, true)) { throw failed_constructor (); } + assert (Glib::file_test (_path, Glib::FILE_TEST_EXISTS)); + existence_check (); + if (open(_path)) { throw failed_constructor (); } |