From 3a18276136d676b6591d154f4783c9fcda3dc496 Mon Sep 17 00:00:00 2001 From: Sotonye Atemie Date: Fri, 6 Jun 2025 16:55:26 -0400 Subject: [PATCH] Use complete basename in `PathUtil::cleanName` instead of basename (#7934) Use `completeBaseName()` in `PathUtill::cleanName` instead of the `baseName()`. Needed for handling filenames with periods correctly. --- src/core/PathUtil.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/PathUtil.cpp b/src/core/PathUtil.cpp index 144c8e986..f374c60af 100644 --- a/src/core/PathUtil.cpp +++ b/src/core/PathUtil.cpp @@ -115,9 +115,9 @@ namespace lmms::PathUtil return path.mid( basePrefix(baseLookup(path)).length() ); } - QString cleanName(const QString & path) + QString cleanName(const QString& path) { - return stripPrefix(QFileInfo(path).baseName()); + return stripPrefix(QFileInfo(path).completeBaseName()); }