Remove dead branch in command line logic

This commit is contained in:
Leon Krause 2018-05-12 12:51:41 +02:00
parent 3bdeb6f8a8
commit 5b4974f171

View file

@ -672,22 +672,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
} else if (I->get() == "--disable-crash-handler") { } else if (I->get() == "--disable-crash-handler") {
OS::get_singleton()->disable_crash_handler(); OS::get_singleton()->disable_crash_handler();
} else { } else {
main_args.push_back(I->get());
//test for game path
bool gpfound = false;
if (!I->get().begins_with("-") && game_path == "") {
DirAccess *da = DirAccess::open(I->get());
if (da != NULL) {
game_path = I->get();
gpfound = true;
memdelete(da);
}
}
if (!gpfound) {
main_args.push_back(I->get());
}
} }
I = N; I = N;