diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-04-14 03:03:35 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-04-14 13:07:07 -0400 |
commit | be0da8ff5c1a3bfbdf0a2934a79aeeed26ade3bc (patch) | |
tree | 85176c4f282901d2b61485aad0c7aaa0e9957987 /libs/ardour/smf_source.cc | |
parent | 2e3a84b15afb749fbbfd05d765badb53434188b0 (diff) |
merge 5764970709f15e85ec30c9cea89c318eb8114c58 from cairocanvas as final(?) change related to data loss
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 ad238e27e1..90e50e6f44 100644 --- a/libs/ardour/smf_source.cc +++ b/libs/ardour/smf_source.cc @@ -62,9 +62,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 */ @@ -93,10 +96,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 (); } |