Sfoglia il codice sorgente

Merge pull request #63170 from KoBeWi/main_failed

Rémi Verschelde 3 anni fa
parent
commit
5db878a76e
1 ha cambiato i file con 3 aggiunte e 4 eliminazioni
  1. 3 4
      main/main.cpp

+ 3 - 4
main/main.cpp

@@ -1044,10 +1044,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
 
 			if (I->next()) {
 				String p = I->next()->get();
-				if (OS::get_singleton()->set_cwd(p) == OK) {
-					//nothing
-				} else {
-					project_path = I->next()->get(); //use project_path instead
+				if (OS::get_singleton()->set_cwd(p) != OK) {
+					OS::get_singleton()->print("Invalid project path specified: \"%s\", aborting.\n", p.utf8().get_data());
+					goto error;
 				}
 				N = I->next()->next();
 			} else {