diff --git a/main.cpp b/main.cpp index 69c167e..ca225c3 100644 --- a/main.cpp +++ b/main.cpp @@ -8,7 +8,8 @@ int main(int argc, char *argv[]) if(res == -1) return 0; else if(res != 0) { - std::cout << " => Error: Das Auswerten der Parameter ist fehlgeschlagen!" << std::endl; + if(settings.debugMode) + std::cout << " => Error: Das Auswerten der Parameter ist fehlgeschlagen!" << std::endl; return res; } else { return mainProgram.start(&settings); diff --git a/parameterManager.cpp b/parameterManager.cpp index 7c23e55..362ccca 100644 --- a/parameterManager.cpp +++ b/parameterManager.cpp @@ -218,8 +218,13 @@ int loadDefaulOptions(Settings &settings) std::cout << " => Warnung: Bitte Info-Texte mit '#' am Anfang: Ungültige Option '" << line << "'." << std::endl; continue; } - std::string what = line.substr(0, line.find("=")), data = line.substr(line.find("=") + 1, line.length() - line.find("=") -1); + + //extrahiere einstellung und wert aus Zeile: + std::string what = line.substr(0, line.find("=")), + data = line.substr(line.find("=") + 1, line.length() - line.find("=") -1); + if(what == "") { + continue; } else if (what == "Socks5Proxy") { if(setS5ProxytoSettings(settings, data) != 0) @@ -359,10 +364,10 @@ int unterOption_help(Settings &settings) std::cout << "Verzeichnisse:" << std::endl << "\tOrdner zum zwischenspeichern der Cookies, AccountNummer" << std::endl << "\tund des letzten Update Datums:" << std::endl - << " => > '" << std::string(settings.cookieFilePath).erase(settings.cookieFilePath.find_last_of(settings.pathSymbol)) << settings.pathSymbol << "'" << std::endl + << " => > '" << std::string(settings.cookieFilePath).erase(settings.cookieFilePath.find_last_of(settings.pathSymbol) + 1) << "'" << std::endl << "\tOrdner zum speichern der Accounts, Default-Einstellungen" << std::endl << "\tund der Serienliste:" << std::endl - << " => > '" << std::string(settings.defaultsFilePath).erase(settings.defaultsFilePath.find_last_of(settings.pathSymbol)) << settings.pathSymbol << "'" << std::endl; + << " => > '" << std::string(settings.defaultsFilePath).erase(settings.defaultsFilePath.find_last_of(settings.pathSymbol) + 1) << "'" << std::endl; return -1; }