Commit 4e46e7df authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix crash opening project with broken autosaved files

parent 4ad5f344
...@@ -427,11 +427,6 @@ bool ProjectManager::checkForBackupFile(const QUrl &url, bool newFile) ...@@ -427,11 +427,6 @@ bool ProjectManager::checkForBackupFile(const QUrl &url, bool newFile)
// Found orphaned autosave file // Found orphaned autosave file
orphanedFile = stale; orphanedFile = stale;
break; break;
} else {
// Another Kdenlive instance is probably handling this autosave file
staleFiles.removeAll(stale);
delete stale;
continue;
} }
} }
} }
...@@ -442,14 +437,13 @@ bool ProjectManager::checkForBackupFile(const QUrl &url, bool newFile) ...@@ -442,14 +437,13 @@ bool ProjectManager::checkForBackupFile(const QUrl &url, bool newFile)
doOpenFile(url, orphanedFile); doOpenFile(url, orphanedFile);
return true; return true;
} }
// remove the stale files
for (KAutoSaveFile *stale : staleFiles) {
stale->open(QIODevice::ReadWrite);
delete stale;
}
return false;
} }
// remove the stale files
for (KAutoSaveFile *stale : staleFiles) {
stale->open(QIODevice::ReadWrite);
delete stale;
}
return false; return false;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment