From d5567228eea729953e7f2f731b9424b00b4d0644 Mon Sep 17 00:00:00 2001 From: Markus Date: Mon, 30 Sep 2019 18:23:34 +0200 Subject: [PATCH] fix error with http links at -u ( not https ) & /redirect/* is now ok too --- programManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/programManager.cpp b/programManager.cpp index 36de585..dd7eddf 100644 --- a/programManager.cpp +++ b/programManager.cpp @@ -359,11 +359,11 @@ int ProgramManager::directLinkModus(Settings *settings) // return 71; while (getline(iStrStream, line).good()) { - if(line.find("https://s.to/redirect/") == std::string::npos) { + if(line.find("/redirect/") == std::string::npos) { std::cout << " => Error: Invalid Redirect Link: '" << line << "'" << std::endl; continue; - } - else if(convertLink(pageManager.replace(line, "https://s.to", ""), &accountManager, settings) != 0) + + } else if(convertLink(line.erase(0, ((line.find("s.to") == std::string::npos) ? 0 : line.find("s.to") + 4 )), &accountManager, settings) != 0) return 78; }