mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 07:05:39 +00:00
Added support for apostrophes in custom collection names.
Creating new custom collections now also converts their names to lower case.
This commit is contained in:
parent
8a6dc3d527
commit
0955b1cf1b
|
@ -543,7 +543,7 @@ std::string CollectionSystemManager::getValidNewCollectionName(std::string inNam
|
||||||
|
|
||||||
// Get valid name.
|
// Get valid name.
|
||||||
while ((remove = name.find_first_not_of(
|
while ((remove = name.find_first_not_of(
|
||||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-[]() "))
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-[]()' "))
|
||||||
!= std::string::npos)
|
!= std::string::npos)
|
||||||
name.erase(remove, 1);
|
name.erase(remove, 1);
|
||||||
}
|
}
|
||||||
|
@ -552,10 +552,12 @@ std::string CollectionSystemManager::getValidNewCollectionName(std::string inNam
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name == "") {
|
if (name == "") {
|
||||||
name = "New Collection";
|
name = "new collection";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name != inName) {
|
name = Utils::String::toLower(name);
|
||||||
|
|
||||||
|
if (Utils::String::toLower(name) != Utils::String::toLower(inName)) {
|
||||||
LOG(LogInfo) << "Had to change name, from: " << inName << " to: " << name;
|
LOG(LogInfo) << "Had to change name, from: " << inName << " to: " << name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue