open external [read-only] midi-files on construction

This commit is contained in:
Robin Gareus 2014-01-20 13:38:28 +01:00
parent eb853b79c4
commit 9e799c6146

View File

@ -66,6 +66,15 @@ SMFSource::SMFSource (Session& s, const string& path, Source::Flag flags)
}
/* file is not opened until write */
if (flags & Writable) {
return;
}
if (open(_path)) {
throw failed_constructor ();
}
_open = true;
}
/** Constructor used for existing internal-to-session files. */