Project archiving: fix color clips incorrectly detected and warn before overwriting project file

parent 6d71034c
......@@ -116,6 +116,9 @@ ArchiveWidget::ArchiveWidget(const QString &projectName, const QDomDocument &doc
ClipController *clip = list.at(i);
ClipType t = clip->clipType();
QString id = clip->clipId();
if (t == Color) {
continue;
}
if (t == SlideShow) {
//TODO: Slideshow files
slideUrls.insert(id, clip->clipUrl());
......@@ -795,6 +798,9 @@ bool ArchiveWidget::processProjectFile()
QString path = archive_url->url().toLocalFile() + QDir::separator() + m_name + ".kdenlive";
QFile file(path);
if (file.exists() && KMessageBox::warningYesNo(this, i18n("Output file already exists. Do you want to overwrite it?")) != KMessageBox::Yes) {
return false;
}
if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
qWarning() << "////// ERROR writing to file: " << path;
KMessageBox::error(this, i18n("Cannot write to file %1", path));
......
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