From 9c755f2d0bdd75b7d1f934a07b79b7ad95a6d4f1 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 30 Jul 2020 15:42:39 +0200 Subject: [PATCH] Fixed a display issue for folders with dots in their names. --- es-core/src/utils/FileSystemUtil.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/es-core/src/utils/FileSystemUtil.cpp b/es-core/src/utils/FileSystemUtil.cpp index f60156c8a..00e20c0b0 100644 --- a/es-core/src/utils/FileSystemUtil.cpp +++ b/es-core/src/utils/FileSystemUtil.cpp @@ -413,9 +413,11 @@ namespace Utils if (fileName == ".") return fileName; - // Find last '.' and erase the extension. - if ((offset = fileName.find_last_of('.')) != std::string::npos) - return fileName.erase(offset); + if (!Utils::FileSystem::isDirectory(_path)) { + // Find last '.' and erase the extension. + if ((offset = fileName.find_last_of('.')) != std::string::npos) + return fileName.erase(offset); + } // No '.' found, filename has no extension. return fileName;