From e4758c19848989b3c56d10de6aa53749cb8bbb2b Mon Sep 17 00:00:00 2001 From: Akinori MUSHA Date: Mon, 22 Dec 2014 23:47:16 +0900 Subject: [PATCH] Fix the temporary filename template so that the original suffix is preserved. --- src/gui/entry/EditEntryWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/entry/EditEntryWidget.cpp b/src/gui/entry/EditEntryWidget.cpp index b7e2fdbe..9621ca9e 100644 --- a/src/gui/entry/EditEntryWidget.cpp +++ b/src/gui/entry/EditEntryWidget.cpp @@ -661,7 +661,7 @@ void EditEntryWidget::openAttachment(const QModelIndex& index) QByteArray attachmentData = m_entryAttachments->value(filename); // tmp file will be removed once the database (or the application) has been closed - QString tmpFileTemplate = QDir::temp().absoluteFilePath(filename); + QString tmpFileTemplate = QDir::temp().absoluteFilePath(QString("XXXXXX.").append(filename)); QTemporaryFile* file = new QTemporaryFile(tmpFileTemplate, this); if (!file->open()) {