diff options
author | Jeffrey Stedfast <jeff@xamarin.com> | 2012-02-28 03:35:41 +0400 |
---|---|---|
committer | Jeffrey Stedfast <jeff@xamarin.com> | 2012-02-28 04:01:27 +0400 |
commit | 70f7bf9f2a216a7797616ccdd10d755ff6650c29 (patch) | |
tree | 8567e40e466ab447453dad3f70940d1f0d8a2adb | |
parent | 2852f3128db23e091eb24eaa016e551125766ff7 (diff) |
[MacDev] Don't pass a null relative path to Path.Combine()
-rw-r--r-- | main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeMonitor.cs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeMonitor.cs b/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeMonitor.cs index b028d76fb2..8984011fbf 100644 --- a/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeMonitor.cs +++ b/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeMonitor.cs @@ -220,20 +220,19 @@ namespace MonoDevelop.MacDev.XcodeSyncing if (knownFiles.Contains (file)) continue; + FilePath relative; + if (relativePath != null) + relative = new FilePath (Path.Combine (relativePath, Path.GetFileName (file))); + else + relative = new FilePath (Path.GetFileName (file)); + if (file.EndsWith (".h")) { NSObjectTypeInfo parsed = NSObjectInfoService.ParseHeader (file); - monitor.Log.WriteLine ("New Objective-C header file found: {0}", Path.Combine (relativePath, Path.GetFileName (file))); + monitor.Log.WriteLine ("New Objective-C header file found: {0}", relative); ctx.TypeSyncJobs.Add (XcodeSyncObjcBackJob.NewType (parsed, relativePath)); } else { - FilePath original, relative; - - if (relativePath != null) - relative = new FilePath (Path.Combine (relativePath, Path.GetFileName (file))); - else - relative = new FilePath (Path.GetFileName (file)); - - original = ctx.Project.BaseDirectory.Combine (relative); + FilePath original = ctx.Project.BaseDirectory.Combine (relative); monitor.Log.WriteLine ("New content file found: {0}", relative); ctx.FileSyncJobs.Add (new XcodeSyncFileBackJob (original, relative, XcodeSyncFileStatus.Added)); |