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