13
0

imported sources should be marked as non-writable and non-removable, always

git-svn-id: svn://localhost/ardour2/branches/3.0@12346 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-05-20 20:52:54 +00:00
parent 6ee23029a3
commit 9c5bcc0f10

View File

@ -564,6 +564,7 @@ Session::import_audiofiles (ImportStatus& status)
/* flush the final length(s) to the header(s) */
for (Sources::iterator x = all_new_sources.begin(); x != all_new_sources.end(); ) {
if ((afs = boost::dynamic_pointer_cast<AudioFileSource>(*x)) != 0) {
afs->update_header((*x)->natural_position(), *now, xnow);
afs->done_with_peakfile_writes ();
@ -574,6 +575,15 @@ Session::import_audiofiles (ImportStatus& status)
Analyser::queue_source_for_analysis (boost::static_pointer_cast<Source>(*x), false);
}
}
/* imported, copied files cannot be written or removed
*/
boost::shared_ptr<FileSource> fs = boost::dynamic_pointer_cast<FileSource>(*x);
if (fs) {
fs->mark_immutable ();
fs->mark_nonremovable ();
}
/* don't create tracks for empty MIDI sources (channels) */