Commit 52b80e39 authored by Laurent Montel's avatar Laurent Montel 😁

USe QFileInfo::exists() method here

parent 92d40123
......@@ -228,7 +228,7 @@ bool AttachmentHandler::saveAs(const Attachment::Ptr &attachment)
// get the saveas file name
QString saveAsFile = QFileDialog::getSaveFileName(d->mParent, i18n("Save Attachment"), attachment->label());
if (saveAsFile.isEmpty() ||
(QFile(saveAsFile).exists() &&
(QFileInfo::exists(saveAsFile) &&
i18n("%1 already exists. Do you want to overwrite it?",
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