import: safely handle unsupported files

Fixes #1191
This commit is contained in:
itsmattkc
2020-09-18 12:58:55 +10:00
parent e733d1c278
commit 8506c82a0c
7 changed files with 148 additions and 8 deletions
+4 -1
View File
@@ -122,7 +122,10 @@ void ProjectImportTask::Import(Folder *folder, const QFileInfoList &import, int
f->set_project(nullptr);
if (f->status() != Footage::kInvalid) {
if (f->status() == Footage::kInvalid) {
// Add to list so we can tell the user about it later
invalid_files_.append(file_info.absoluteFilePath());
} else {
// Create undoable command that adds the items to the model
new ProjectViewModel::AddItemCommand(model_,
folder,