aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-12-12 19:34:57 +0300
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-12-12 19:34:57 +0300
commiteabed200f5fe09a37942a52387c0d3f25070b0c3 (patch)
tree0f5d66d07e979ab61ce44e71cab799671d481e85
parent1ffa6b96adeba8c1a00a0a32112c8b0aaeb2350e (diff)
downloadlibquotient-eabed200f5fe09a37942a52387c0d3f25070b0c3.tar.gz
libquotient-eabed200f5fe09a37942a52387c0d3f25070b0c3.zip
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.
-rw-r--r--lib/room.cpp2
1 files changed, 1 insertions, 1 deletions
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);