Parcourir la source

Fix Polycode IDE can't run projects on another drive. (fixes #591, fixes #601)

Joachim Meyer il y a 11 ans
Parent
commit
74617f3bed

+ 2 - 1
Core/Contents/Source/PolyWinCore.cpp

@@ -1073,11 +1073,12 @@ std::vector<Polycode::Rectangle> Win32Core::getVideoModes() {
 
 String Win32Core::executeExternalCommand(String command,  String args, String inDirectory) {
 	String execInDirectory = inDirectory;
+	
 	if(inDirectory == "") {
 		execInDirectory = defaultWorkingDirectory;
 	}
 
-	String cmdString = "cd \""+execInDirectory+"\" & "+command+" "+args;
+	String cmdString = inDirectory.substr(0, inDirectory.find_first_of(":")+1)+" & cd \"" + execInDirectory + "\" & " + command + " " + args;
 
 	char   psBuffer[128];
 	FILE   *pPipe;

+ 1 - 1
IDE/Contents/Source/PolycodeToolLauncher.cpp

@@ -63,7 +63,7 @@ void PolycodeRunner::runThread() {
 #endif
 
 	String ret = CoreServices::getInstance()->getCore()->executeExternalCommand(command, args, inFolder);
-	CoreServices::getInstance()->getCore()->removeDiskItem(polyappPath);	
+	CoreServices::getInstance()->getCore()->removeDiskItem(polyappPath);
 }
 
 PolycodeToolLauncher::PolycodeToolLauncher() {