From 4c8922b619136be24fb012d4e5c22de5e4755022 Mon Sep 17 00:00:00 2001 From: zvon Date: Thu, 24 Jan 2019 16:37:25 +0100 Subject: [PATCH] Fix replacing windows-illegal characters (I have no idea how it worked till now) --- tv_rename.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tv_rename.cpp b/tv_rename.cpp index 16e2f47..4542464 100644 --- a/tv_rename.cpp +++ b/tv_rename.cpp @@ -123,7 +123,7 @@ void singleSeason( const std::string &path, const std::string &show, int season, auto name = compilePattern(pattern, season, num+1, og_name.substr(0, pos), episodes[num], show) + og_name.substr(pos); // replace characters illegal in windows if desired if( !linux ) { - season_code.erase(std::remove_if(name.begin(), name.end(), [](char x) {return x == '?' || x == '"' || x == '\\' || x == '|' || x == '*';}), season_code.end()); + name.erase(std::remove_if(name.begin(), name.end(), [](char x) {return x == '?' || x == '"' || x == '\\' || x == '|' || x == '*';}), name.end()); size_t max{name.size()}; for( size_t i = 0; i < max ; i++ ) { if( name[i] == '<' ) {