From 4badac3c90cd0e77b2f79c14e2b5e7a08893583e Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 7 Jul 2009 21:23:11 +0000 Subject: [PATCH] Make a renamed OpenSim.Server.exe use the corret ini file, e.g. renaming OpenSim.Server.exe to OpenSim.AssetServer.exe will cause OpenSim.AssetServer.ini to be read by that instance. This facilitates legacy usage --- OpenSim/Server/Base/ServicesServerBase.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OpenSim/Server/Base/ServicesServerBase.cs b/OpenSim/Server/Base/ServicesServerBase.cs index 757b2c1268..0c00c1506a 100644 --- a/OpenSim/Server/Base/ServicesServerBase.cs +++ b/OpenSim/Server/Base/ServicesServerBase.cs @@ -26,6 +26,7 @@ */ using System; +using System.IO; using System.Xml; using System.Threading; using System.Reflection; @@ -83,10 +84,8 @@ namespace OpenSim.Server.Base // Automagically create the ini file name // - string fullName = Assembly.GetEntryAssembly().FullName; - AssemblyName assemblyName = new AssemblyName(fullName); - - string iniFile = assemblyName.Name + ".ini"; + string fileName = Path.GetFileNameWithoutExtension(Assembly.GetEntryAssembly().Location); + string iniFile = fileName + ".ini"; IConfig startupConfig = argvConfig.Configs["Startup"]; if (startupConfig != null) @@ -204,7 +203,8 @@ namespace OpenSim.Server.Base { if (startupConfig != null) fileAppender.File = startupConfig.GetString("logfile", - assemblyName.Name + ".log"); + fileName + ".log"); + // assemblyName.Name + ".log"); } // Register the quit command