2
0
Эх сурвалжийг харах

Use execvp instead of execv to allow OS.execute() to search through PATH.
Fix #12003.

Elia Argentieri 8 жил өмнө
parent
commit
600efa0346

+ 1 - 1
drivers/unix/os_unix.cpp

@@ -343,7 +343,7 @@ Error OS_Unix::execute(const String &p_path, const List<String> &p_arguments, bo
 			execvp(getprogname(), &args[0]);
 			execvp(getprogname(), &args[0]);
 		}
 		}
 #else
 #else
-		execv(p_path.utf8().get_data(), &args[0]);
+		execvp(p_path.utf8().get_data(), &args[0]);
 #endif
 #endif
 		// still alive? something failed..
 		// still alive? something failed..
 		fprintf(stderr, "**ERROR** OS_Unix::execute - Could not create child process while executing: %s\n", p_path.utf8().get_data());
 		fprintf(stderr, "**ERROR** OS_Unix::execute - Could not create child process while executing: %s\n", p_path.utf8().get_data());