From 1d55be786cb057af346ef6520d967e4473392d8b Mon Sep 17 00:00:00 2001 From: William Gallafent Date: Fri, 7 Sep 2012 16:09:33 +0100 Subject: [PATCH 2/2] Correct the C++ version of the FileInfo::baseName function --- src/lib/tools/fileinfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/tools/fileinfo.cpp b/src/lib/tools/fileinfo.cpp index 31d36ed..05de1d7 100644 --- a/src/lib/tools/fileinfo.cpp +++ b/src/lib/tools/fileinfo.cpp @@ -60,7 +60,7 @@ QString FileInfo::fileName(const QString &fp) QString FileInfo::baseName(const QString &fp) { QString fn = fileName(fp); - int dot = fn.indexOf(QLatin1Char('.')); + int dot = fn.lastIndexOf(QLatin1Char('.')); if (dot < 0) return fp; return fn.mid(0, dot); -- 1.7.11.5