Fix artist/album names ending with period crashing program

This commit is contained in:
_ 2020-12-15 15:56:48 -07:00
parent 22ec0303c7
commit 0e2a1ba0ae

View File

@ -103,7 +103,7 @@ std::wstring Utils::FixPathStr(std::wstring str)
// No forbidden words or ending periods or spaces
if (std::regex_match(str, std::wregex(L"^(CON|PRN|AUX|NUL|COM[0-9]|LPT[0-9])$| +$|\\.+$",
std::regex_constants::ECMAScript | std::regex_constants::icase)))
std::regex_constants::ECMAScript | std::regex_constants::icase)) || str.back() == L'.')
str.append(L"_");
return str;