[mapguide-commits] r5122 - trunk/Tools/Maestro/MaestroAPI
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Wed Sep 8 01:08:16 EDT 2010
Author: jng
Date: 2010-09-08 05:08:15 +0000 (Wed, 08 Sep 2010)
New Revision: 5122
Modified:
trunk/Tools/Maestro/MaestroAPI/ConnectionProviderRegistry.cs
Log:
Possible fix for #1425: Use System.Uri to convert file uris to file paths in a platform-neutral manner
Modified: trunk/Tools/Maestro/MaestroAPI/ConnectionProviderRegistry.cs
===================================================================
--- trunk/Tools/Maestro/MaestroAPI/ConnectionProviderRegistry.cs 2010-09-08 04:10:30 UTC (rev 5121)
+++ trunk/Tools/Maestro/MaestroAPI/ConnectionProviderRegistry.cs 2010-09-08 05:08:15 UTC (rev 5122)
@@ -46,12 +46,9 @@
_ctors = new Dictionary<string, Type>();
_providers = new List<ConnectionProviderEntry>();
- var path = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase);
- path = System.IO.Path.Combine(path, PROVIDER_CONFIG);
+ var dir = System.IO.Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath);
+ var path = System.IO.Path.Combine(dir, PROVIDER_CONFIG);
- //Convert file uri to path syntax
- path = path.Substring(6).Replace('/', '\\');
-
_dllRoot = System.IO.Path.GetDirectoryName(path);
XmlDocument doc = new XmlDocument();
More information about the mapguide-commits
mailing list