Fixed a display issue for folders with dots in their names.

This commit is contained in:
Leon Styhre 2020-07-30 15:42:39 +02:00
parent 2371ef51bc
commit 9c755f2d0b

View file

@ -413,9 +413,11 @@ namespace Utils
if (fileName == ".") if (fileName == ".")
return fileName; return fileName;
// Find last '.' and erase the extension. if (!Utils::FileSystem::isDirectory(_path)) {
if ((offset = fileName.find_last_of('.')) != std::string::npos) // Find last '.' and erase the extension.
return fileName.erase(offset); if ((offset = fileName.find_last_of('.')) != std::string::npos)
return fileName.erase(offset);
}
// No '.' found, filename has no extension. // No '.' found, filename has no extension.
return fileName; return fileName;