From eabed200f5fe09a37942a52387c0d3f25070b0c3 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Thu, 12 Dec 2019 19:34:57 +0300 Subject: Room::fileNameToDownload(): fix a typo in a check on Windows As a result of the typo, the extension was never attached to returned file names if there was none originally. --- lib/room.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/room.cpp b/lib/room.cpp index 60b9a684..eefccdb5 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -1037,7 +1037,7 @@ QString Room::Private::fileNameToDownload(const RoomMessageEvent* event) const if (QSysInfo::productType() == "windows") { if (const auto& suffixes = fileInfo->mimeType.suffixes(); - suffixes.isEmpty() + !suffixes.isEmpty() && std::none_of(suffixes.begin(), suffixes.end(), [&fileName](const QString& s) { return fileName.endsWith(s); -- cgit v1.2.3