Created
December 22, 2011 19:05
-
-
Save alanmcgovern/1511436 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 7c74a8578fa9c99f855863ed87ac201bb4ea4b45 | |
Author: Alan McGovern <alan.mcgovern@gmail.com> | |
Date: Thu Dec 22 19:05:13 2011 +0000 | |
[IPhone] Quote the extra mtouch args | |
Fix for bug #554. | |
diff --git a/MonoDevelop.IPhone/MonoDevelop.IPhone/Project/IPhoneBuildExtension.cs b/MonoDevelop.IPhone/MonoDevelop.IPhone/Project/IPhoneBuildExtension.cs | |
index e038d24..9a4f166 100644 | |
--- a/MonoDevelop.IPhone/MonoDevelop.IPhone/Project/IPhoneBuildExtension.cs | |
+++ b/MonoDevelop.IPhone/MonoDevelop.IPhone/Project/IPhoneBuildExtension.cs | |
@@ -572,15 +572,21 @@ namespace MonoDevelop.IPhone | |
static void AddExtraArgs (ProcessArgumentBuilder args, string extraArgs, IPhoneProject proj, | |
IPhoneProjectConfiguration conf) | |
{ | |
+ Func<string> quote = s => { | |
+ if (s.Contains (" ")) | |
+ return ProcessArgumentBuilder.Quote (s); | |
+ return s; | |
+ }; | |
+ | |
if (!string.IsNullOrEmpty (extraArgs)) { | |
var customTags = new Dictionary<string, string> (StringComparer.OrdinalIgnoreCase) { | |
- { "projectdir", proj.BaseDirectory }, | |
- { "solutiondir", proj.ParentSolution.BaseDirectory }, | |
- { "appbundledir", conf.AppDirectory }, | |
- { "targetpath", conf.CompiledOutputName }, | |
- { "targetdir", conf.CompiledOutputName.ParentDirectory }, | |
- { "targetname", conf.CompiledOutputName.FileName }, | |
- { "targetext", conf.CompiledOutputName.Extension }, | |
+ { "projectdir", quote (proj.BaseDirectory) }, | |
+ { "solutiondir", quote (proj.ParentSolution.BaseDirectory) }, | |
+ { "appbundledir", quote (conf.AppDirectory) }, | |
+ { "targetpath", quote (conf.CompiledOutputName) }, | |
+ { "targetdir", quote (conf.CompiledOutputName.ParentDirectory) }, | |
+ { "targetname", quote (conf.CompiledOutputName.FileName) }, | |
+ { "targetext", quote (conf.CompiledOutputName.Extension) }, | |
}; | |
args.Add (StringParserService.Parse (extraArgs, customTags)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment