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

Fix cannot save custom render profile

Fixes #1588
parent d3b2b5dd
Pipeline #276064 passed with stage
in 4 minutes and 55 seconds
......@@ -309,7 +309,7 @@ const QString RenderPresetRepository::savePreset(RenderPresetModel *preset, bool
dir.mkpath(QStringLiteral("."));
}
QString fileName(dir.absoluteFilePath(QStringLiteral("customprofiles.xml")));
if (!Xml::docContentFromFile(doc, fileName, false)) {
if (dir.exists(QStringLiteral("customprofiles.xml")) && !Xml::docContentFromFile(doc, fileName, false)) {
KMessageBox::error(nullptr, i18n("Cannot read file %1", fileName));
return {};
}
......
Supports Markdown
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