[Mono-list] XmlDocument Load method bug ?

Tiago Lima tiago.lima@vianw.pt
Sun, 7 Dec 2003 17:29:51 +0000


Hi,

After installing today's mono daily I've reinstalled monodoc and I get this 
error (I guess this is from XmlDocument.Load Method):

monodoc-0.8 # monodoc

Unhandled Exception: System.IO.FileNotFoundException: Could not find file "/
usr/usr/lib/monodoc.config"
in [0x00147] (at /tmp/snapshot/20031207/mcs/class/corlib/System.IO/
FileStream.cs:130) System.IO.FileStream:.ctor 
(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,bool)
in [0x0000c] (at /tmp/snapshot/20031207/mcs/class/corlib/System.IO/
FileStream.cs:72) System.IO.FileStream:.ctor 
(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
in <0x00081> (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor 
(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
in [0x00076] (at /home/duncan/Mono/mcs/class/System.XML/System.Xml/
XmlUrlResolver.cs:56) System.Xml.XmlUrlResolver:GetEntity 
(System.Uri,string,System.Type)
in [0x00064] (at /home/duncan/Mono/mcs/class/System.XML/System.Xml/
XmlInputStream.cs:103) Mono.Xml.Native.XmlInputStream:.ctor 
(string,bool,System.Xml.XmlResolver,string)
in <0x0008f> (wrapper remoting-invoke-with-check) 
Mono.Xml.Native.XmlInputStream:.ctor 
(string,bool,System.Xml.XmlResolver,string)
in [0x00006] (at /home/duncan/Mono/mcs/class/System.XML/System.Xml/
XmlInputStream.cs:57) Mono.Xml.Native.XmlStreamReader:.ctor 
(string,bool,System.Xml.XmlResolver,string)
in [0x00005] (at /home/duncan/Mono/mcs/class/System.XML/System.Xml/
XmlInputStream.cs:51) Mono.Xml.Native.XmlStreamReader:.ctor 
(string,System.Xml.XmlResolver,string)
in <0x0007b> (wrapper remoting-invoke-with-check) 
Mono.Xml.Native.XmlStreamReader:.ctor (string,System.Xml.XmlResolver,string)
in [0x00005] (at /home/duncan/Mono/mcs/class/System.XML/System.Xml/
XmlTextReader.cs:80) System.Xml.XmlTextReader:.ctor 
(string,System.Xml.XmlNameTable)
in [0x00007] (at /home/duncan/Mono/mcs/class/System.XML/System.Xml/
XmlTextReader.cs:50) System.Xml.XmlTextReader:.ctor (string)
in [0x00001] (at /home/duncan/Mono/mcs/class/System.XML/System.Xml/
XmlDocument.cs:589) System.Xml.XmlDocument:Load (string)
in [0x00037] (at /root/mono-doc/monodoc-0.8/browser/provider.cs:652) 
Monodoc.RootTree:LoadTree ()
in [0x0015d] (at /root/mono-doc/monodoc-0.8/browser/browser.cs:181) 
Monodoc.Browser:.ctor ()
in [0x00120] (at /root/mono-doc/monodoc-0.8/browser/browser.cs:82) 
Monodoc.Driver:Main (string[])

Do you want me to post a bug in bugzilla ?

This is from monodoc "browser/provider.cs" file, see around line 650:

	public static RootTree LoadTree ()
	{
		string basedir;
		string myPath = System.Reflection.Assembly.GetExecutingAssembly ().Location;
		string cfgFile = Path.ChangeExtension (myPath, ".config");
		if (!File.Exists (cfgFile)) {
			basedir = ".";
			return LoadTree (basedir);
		}

		XmlDocument d = new XmlDocument ();
>>>>>	d.Load (cfgFile); 	// cfg file is /usr/lib/monodoc.config but 
XmlDocument.Load wants /usr/usr/lib/monodoc.config ??
		basedir = d.SelectSingleNode ("config/path").Attributes ["docsPath"].Value;

		return LoadTree (basedir);
	}

	Tiago Lima