diff options
author | Alan McGovern <alan@xamarin.com> | 2015-08-31 22:50:27 +0300 |
---|---|---|
committer | Alan McGovern <alan@xamarin.com> | 2015-08-31 22:51:52 +0300 |
commit | c16e63aeeaa63ea912638f958ae1547905aed4e5 (patch) | |
tree | eb4f0158fe6f515cf4a61efa1abe3d86174a5dc9 | |
parent | 3b08c95b6862a5f0267d78e773b93942d8eb9b81 (diff) |
[Core] Avoid pointless exceptionsmonodevelop-5.10.0.704
If the links resolve to an empty path, just skip the file
instead of crashing later on when we call Path.GetFullPath ("");
This makes debugging XS with a catchpoint on System.Exception
much nicer.
-rw-r--r-- | main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoTargetRuntime.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoTargetRuntime.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoTargetRuntime.cs index 837dac0d7a..84fc117ddc 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoTargetRuntime.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoTargetRuntime.cs @@ -241,7 +241,10 @@ namespace MonoDevelop.Core.Assemblies return; foreach (string pcfile in GetAllPkgConfigFiles ()) { try { - ParsePCFile (new FilePath (pcfile).ResolveLinks ()); + var pc = new FilePath (pcfile).ResolveLinks (); + if (!string.IsNullOrEmpty (pc)) + ParsePCFile (pc); + if (ShuttingDown) return; } |