|
From: <fab...@us...> - 2010-09-28 21:23:14
|
Revision: 5228
http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5228&view=rev
Author: fabiomaulo
Date: 2010-09-28 21:23:08 +0000 (Tue, 28 Sep 2010)
Log Message:
-----------
Fix NH-2352
Modified Paths:
--------------
trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs
Modified: trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs 2010-09-26 18:06:04 UTC (rev 5227)
+++ trunk/nhibernate/src/NHibernate/Cfg/Configuration.cs 2010-09-28 21:23:08 UTC (rev 5228)
@@ -1841,7 +1841,11 @@
protected virtual string GetDefaultConfigurationFilePath()
{
string baseDir = AppDomain.CurrentDomain.BaseDirectory;
- string relativeSearchPath = AppDomain.CurrentDomain.RelativeSearchPath.Split(';').First();
+
+ // Note RelativeSearchPath can be null even if the doc say something else; don't remove the check
+ var searchPath = AppDomain.CurrentDomain.RelativeSearchPath ?? string.Empty;
+
+ string relativeSearchPath = searchPath.Split(';').First();
string binPath = Path.Combine(baseDir, relativeSearchPath);
return Path.Combine(binPath, DefaultHibernateCfgFileName);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|