From 0e2a1ba0ae45eb6152cc79e923ee4693d29e9a94 Mon Sep 17 00:00:00 2001 From: _ <🐱> Date: Tue, 15 Dec 2020 15:56:48 -0700 Subject: [PATCH] Fix artist/album names ending with period crashing program --- SpotifyKeyDumper/Utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SpotifyKeyDumper/Utils.cpp b/SpotifyKeyDumper/Utils.cpp index e18f937..c512887 100644 --- a/SpotifyKeyDumper/Utils.cpp +++ b/SpotifyKeyDumper/Utils.cpp @@ -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;