aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/ConfigurationLoader.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Application/ConfigurationLoader.cs')
-rw-r--r--OpenSim/Region/Application/ConfigurationLoader.cs19
1 files changed, 6 insertions, 13 deletions
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs
index 4a7c8b0..8d95c41 100644
--- a/OpenSim/Region/Application/ConfigurationLoader.cs
+++ b/OpenSim/Region/Application/ConfigurationLoader.cs
@@ -107,15 +107,13 @@ namespace OpenSim
107 } 107 }
108 else 108 else
109 { 109 {
110 m_log.ErrorFormat("Master ini file {0} not found", masterFilePath); 110 m_log.ErrorFormat("Master ini file {0} not found", Path.GetFullPath(masterFilePath));
111 Environment.Exit(1); 111 Environment.Exit(1);
112 } 112 }
113 } 113 }
114 } 114 }
115 115
116 116 string iniFileName = startupConfig.GetString("inifile", "OpenSim.ini");
117 string iniFileName =
118 startupConfig.GetString("inifile", "OpenSim.ini");
119 117
120 if (IsUri(iniFileName)) 118 if (IsUri(iniFileName))
121 { 119 {
@@ -131,8 +129,7 @@ namespace OpenSim
131 if (!File.Exists(Application.iniFilePath)) 129 if (!File.Exists(Application.iniFilePath))
132 { 130 {
133 iniFileName = "OpenSim.xml"; 131 iniFileName = "OpenSim.xml";
134 Application.iniFilePath = Path.GetFullPath( 132 Application.iniFilePath = Path.GetFullPath(Path.Combine(Util.configDir(), iniFileName));
135 Path.Combine(Util.configDir(), iniFileName));
136 } 133 }
137 134
138 if (File.Exists(Application.iniFilePath)) 135 if (File.Exists(Application.iniFilePath))
@@ -142,15 +139,12 @@ namespace OpenSim
142 } 139 }
143 } 140 }
144 141
145 string iniDirName = 142 string iniDirName = startupConfig.GetString("inidirectory", "config");
146 startupConfig.GetString("inidirectory", "config"); 143 string iniDirPath = Path.Combine(Util.configDir(), iniDirName);
147 string iniDirPath =
148 Path.Combine(Util.configDir(), iniDirName);
149 144
150 if (Directory.Exists(iniDirPath)) 145 if (Directory.Exists(iniDirPath))
151 { 146 {
152 m_log.InfoFormat("Searching folder {0} for config ini files", 147 m_log.InfoFormat("Searching folder {0} for config ini files", iniDirPath);
153 iniDirPath);
154 148
155 string[] fileEntries = Directory.GetFiles(iniDirName); 149 string[] fileEntries = Directory.GetFiles(iniDirName);
156 foreach (string filePath in fileEntries) 150 foreach (string filePath in fileEntries)
@@ -172,7 +166,6 @@ namespace OpenSim
172 if (sources.Count == 0) 166 if (sources.Count == 0)
173 { 167 {
174 m_log.FatalFormat("[CONFIG]: Could not load any configuration"); 168 m_log.FatalFormat("[CONFIG]: Could not load any configuration");
175 m_log.FatalFormat("[CONFIG]: Did you copy the OpenSimDefaults.ini.example file to OpenSimDefaults.ini?");
176 Environment.Exit(1); 169 Environment.Exit(1);
177 } 170 }
178 171