Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

If assembly could not be found, search in datafile-directory.

  • Loading branch information...
commit 3b711c42ed9f34ad70c96341a2700be07b546232 1 parent 89fa165
@alpinechough alpinechough authored vargaz committed
Showing with 10 additions and 0 deletions.
  1. +1 −0  ChangeLog
  2. +9 −0 CoverageModel.cs
View
1  ChangeLog
@@ -1,6 +1,7 @@
2011-01-15 Andreas Windischer
* gui/gtk/CoverageView.cs: Expand on double click fix.
+ * CoverageModel.cs: If assembly could not be found, search in datafile-directory.
2011-01-12 Andreas Windischer
View
9 CoverageModel.cs
@@ -16,6 +16,7 @@ namespace MonoCov
public class CoverageModel : CoverageItem {
+ private string dataFileName;
private Hashtable namespaces;
private Hashtable classes;
private Hashtable sources;
@@ -32,6 +33,7 @@ public class CoverageModel : CoverageItem {
public CoverageModel ()
{
+ dataFileName = string.Empty;
namespaces = new Hashtable ();
classes = new Hashtable ();
sources = new Hashtable ();
@@ -94,6 +96,12 @@ private void LoadAssemblies (XmlDocument dom)
string filename = n.Attributes ["filename"].Value;
MonoSymbolFile symbolFile;
+ if (!File.Exists (filename)) {
+ string newFilename = Path.Combine(Path.GetDirectoryName (dataFileName), Path.GetFileName (filename));
+ if (File.Exists (newFilename))
+ filename = newFilename;
+ }
+
#if USE_REFLECTION
Assembly assembly = Assembly.Load (assemblyName);
@@ -190,6 +198,7 @@ private void LoadFilters (XmlDocument dom)
public void ReadFromFile (string fileName)
{
+ dataFileName = fileName;
namespaces = new Hashtable ();
classes = new Hashtable ();
Please sign in to comment.
Something went wrong with that request. Please try again.