diff --git a/src/gui/entry/NewEntryAttachmentsDialog.cpp b/src/gui/entry/NewEntryAttachmentsDialog.cpp index b8da3b791f..abef2afb9b 100644 --- a/src/gui/entry/NewEntryAttachmentsDialog.cpp +++ b/src/gui/entry/NewEntryAttachmentsDialog.cpp @@ -67,7 +67,7 @@ void NewEntryAttachmentsDialog::saveAttachment() auto text = m_ui->attachmentTextEdit->toPlainText().toUtf8(); QString error; - if (validateFileName(fileName, error)) { + if (!validateFileName(fileName, error)) { QMessageBox::warning(this, tr("Save attachment"), error); return; }