From 2389495d9624c21d5d51fbdf1139e893e0fcc41a Mon Sep 17 00:00:00 2001 From: Gabriele Date: Tue, 9 Dec 2014 21:27:37 +0100 Subject: [PATCH] Ignore .!qB when extracting file extensions --- src/fs_utils.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/fs_utils.cpp b/src/fs_utils.cpp index ab58b5b82..9cb37e963 100644 --- a/src/fs_utils.cpp +++ b/src/fs_utils.cpp @@ -89,8 +89,9 @@ QString fsutils::fromNativePath(const QString &path) { * Returns the file extension part of a file name. */ QString fsutils::fileExtension(const QString &filename) { - const int point_index = filename.lastIndexOf("."); - return (point_index >= 0) ? filename.mid(point_index + 1) : QString(); + QString ext = QString(filename).remove(".!qB"); + const int point_index = ext.lastIndexOf("."); + return (point_index >= 0) ? ext.mid(point_index + 1) : QString(); } QString fsutils::fileName(const QString& file_path) {