File mono-545578-fix.diff of Package mono
From e7028649a31baaa1187f574ea4986dbd892dd66d Mon Sep 17 00:00:00 2001
From: Chris Howie <me@chrishowie.com>
Date: Wed, 4 Aug 2010 20:38:24 -0400
Subject: [PATCH] Fix for #545578
---
.../System.Configuration/AppSettingsSection.cs | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/mcs/class/System.Configuration/System.Configuration/AppSettingsSection.cs b/mcs/class/System.Configuration/System.Configuration/AppSettingsSection.cs
index 1008a0a..7e8ab35 100644
--- a/mcs/class/System.Configuration/System.Configuration/AppSettingsSection.cs
+++ b/mcs/class/System.Configuration/System.Configuration/AppSettingsSection.cs
@@ -72,8 +72,11 @@ namespace System.Configuration {
if (File != "") {
try {
- Stream s = System.IO.File.OpenRead (File);
- XmlReader subreader = new ConfigXmlTextReader (s, File);
+ string confFileDir = new FileInfo (Configuration.FilePath).DirectoryName;
+ string filePath = Path.Combine (confFileDir, File);
+
+ Stream s = System.IO.File.OpenRead (filePath);
+ XmlReader subreader = new ConfigXmlTextReader (s, filePath);
base.DeserializeElement (subreader, serializeCollectionKey);
s.Close ();
}
--
1.6.3.3