mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-13 10:06:33 +01:00
more work on linking file existence and removability
This commit is contained in:
parent
062dd5b71d
commit
5764970709
6 changed files with 73 additions and 31 deletions
|
|
@ -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 ();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue