Normalize the string returned by Extension() to lowercase.
This would otherwise break code that branches on the extension,
such as that after 06a188cc
.
This commit is contained in:
parent
2371068d01
commit
476860acbb
@ -428,8 +428,11 @@ void SolveSpaceUI::UpdateWindowTitle() {
|
|||||||
|
|
||||||
static std::string Extension(const std::string &filename) {
|
static std::string Extension(const std::string &filename) {
|
||||||
int dot = filename.rfind('.');
|
int dot = filename.rfind('.');
|
||||||
if(dot >= 0)
|
if(dot >= 0) {
|
||||||
return filename.substr(dot + 1, filename.length());
|
std::string ext = filename.substr(dot + 1, filename.length());
|
||||||
|
std::transform(ext.begin(), ext.end(), ext.begin(), ::tolower);
|
||||||
|
return ext;
|
||||||
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user