From eb62e74dc4deff17a04d73969ca8195bc74ccf4c Mon Sep 17 00:00:00 2001 From: Timur Doumler Date: Mon, 14 Dec 2015 15:14:49 +0000 Subject: [PATCH] Surround path with escaped quotes so that Android Studio can open projects on Windows that contain whitespace in the path. --- .../Project Saving/jucer_ProjectExport_AndroidStudio.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_AndroidStudio.h b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_AndroidStudio.h index 3cfbc67118..cfe2274910 100644 --- a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_AndroidStudio.h +++ b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_AndroidStudio.h @@ -64,7 +64,13 @@ public: const File targetFolder (getTargetFolder()); - return androidStudioExecutable.startAsProcess (targetFolder.getFullPathName()); + #if JUCE_WINDOWS + // on Windows, we have to surround the path with extra quotes, otherwise Android Studio + // will choke if there are any space characters in the path. + return androidStudioExecutable.startAsProcess ("\"" + targetFolder.getFullPathName() + "\""); + #else + return androidStudioExecutable.startAsProcess(targetFolder.getFullPathName()); + #endif } void createExporterProperties (PropertyListBuilder& props) override