fix truncateFilePath

This commit is contained in:
Christopher A. Mosher 2022-12-11 23:08:04 -05:00
parent dde4bd09a7
commit 49d6e664f5
1 changed files with 1 additions and 9 deletions

View File

@ -384,15 +384,7 @@ void ScreenImage::setDiskFile(int slot, int drive, const std::filesystem::path &
}
std::string ScreenImage::truncateFilePath(const std::filesystem::path& filepath) {
std::string f(filepath.c_str());
size_t slash = f.find_last_of("/\\");
if (slash != std::string::npos) {
f = f.substr(slash + 1);
}
if (f.length() > 12) {
f = f.substr(0, 12);
}
return f;
return filepath.stem().string().substr(0, 12);
}
void ScreenImage::clearCurrentDrive(int slot, int drive) {