Cleanup extension filename and bugfix session preview

This commit is contained in:
Bruno Herbelin
2022-01-12 23:16:23 +01:00
parent aab0c055ed
commit 1146a9125b
7 changed files with 28 additions and 17 deletions

View File

@@ -163,6 +163,14 @@ string SystemToolkit::extension_filename(const string& filename)
return ext;
}
bool SystemToolkit::has_extension(const std::string& filename, const std::string& extension)
{
std::string ext = extension_filename(filename);
std::transform (ext.begin(), ext.end(), ext.begin(), ::tolower);
return ext.compare(extension) == 0;
}
std::string SystemToolkit::home_path()
{
string homePath;