aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Configuration/XML/XmlConfiguration.cs6
-rw-r--r--OpenSim/Framework/Console/LogBase.cs1
-rw-r--r--OpenSim/Framework/Data.DB4o/DB4oUserData.cs4
-rw-r--r--OpenSim/Framework/General/Types/EstateSettings.cs6
-rw-r--r--OpenSim/Framework/General/Util.cs34
5 files changed, 48 insertions, 3 deletions
diff --git a/OpenSim/Framework/Configuration/XML/XmlConfiguration.cs b/OpenSim/Framework/Configuration/XML/XmlConfiguration.cs
index 72faed6..ffb24ff 100644
--- a/OpenSim/Framework/Configuration/XML/XmlConfiguration.cs
+++ b/OpenSim/Framework/Configuration/XML/XmlConfiguration.cs
@@ -31,6 +31,7 @@ using System.Xml;
31 31
32using OpenSim.Framework.Interfaces; 32using OpenSim.Framework.Interfaces;
33using OpenSim.Framework.Configuration.Interfaces; 33using OpenSim.Framework.Configuration.Interfaces;
34using OpenSim.Framework.Utilities;
34 35
35namespace OpenSim.Framework.Configuration 36namespace OpenSim.Framework.Configuration
36{ 37{
@@ -119,6 +120,11 @@ namespace OpenSim.Framework.Configuration
119 120
120 public void Commit() 121 public void Commit()
121 { 122 {
123 if (!Directory.Exists(Util.configDir()))
124 {
125 Directory.CreateDirectory(Util.configDir());
126 }
127
122 doc.Save(fileName); 128 doc.Save(fileName);
123 } 129 }
124 130
diff --git a/OpenSim/Framework/Console/LogBase.cs b/OpenSim/Framework/Console/LogBase.cs
index a088af8..a090377 100644
--- a/OpenSim/Framework/Console/LogBase.cs
+++ b/OpenSim/Framework/Console/LogBase.cs
@@ -63,6 +63,7 @@ namespace OpenSim.Framework.Console
63 } 63 }
64 64
65 System.Console.WriteLine("Logs will be saved to current directory in " + LogFile); 65 System.Console.WriteLine("Logs will be saved to current directory in " + LogFile);
66
66 Log = File.AppendText(LogFile); 67 Log = File.AppendText(LogFile);
67 Log.WriteLine("========================================================================"); 68 Log.WriteLine("========================================================================");
68 Log.WriteLine(componentname + " Started at " + DateTime.Now.ToString()); 69 Log.WriteLine(componentname + " Started at " + DateTime.Now.ToString());
diff --git a/OpenSim/Framework/Data.DB4o/DB4oUserData.cs b/OpenSim/Framework/Data.DB4o/DB4oUserData.cs
index 1a3bcb9..ef4211e 100644
--- a/OpenSim/Framework/Data.DB4o/DB4oUserData.cs
+++ b/OpenSim/Framework/Data.DB4o/DB4oUserData.cs
@@ -26,7 +26,9 @@
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.IO;
29using libsecondlife; 30using libsecondlife;
31using OpenSim.Framework.Utilities;
30 32
31namespace OpenSim.Framework.Data.DB4o 33namespace OpenSim.Framework.Data.DB4o
32{ 34{
@@ -45,7 +47,7 @@ namespace OpenSim.Framework.Data.DB4o
45 /// </summary> 47 /// </summary>
46 public void Initialise() 48 public void Initialise()
47 { 49 {
48 manager = new DB4oUserManager("userprofiles.yap"); 50 manager = new DB4oUserManager(Path.Combine(Util.dataDir(),"userprofiles.yap"));
49 } 51 }
50 52
51 /// <summary> 53 /// <summary>
diff --git a/OpenSim/Framework/General/Types/EstateSettings.cs b/OpenSim/Framework/General/Types/EstateSettings.cs
index 11594fd..ae61752 100644
--- a/OpenSim/Framework/General/Types/EstateSettings.cs
+++ b/OpenSim/Framework/General/Types/EstateSettings.cs
@@ -25,9 +25,11 @@
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28 28using System.IO;
29using libsecondlife; 29using libsecondlife;
30using OpenSim.Framework.Configuration; 30using OpenSim.Framework.Configuration;
31using OpenSim.Framework.Utilities;
32
31namespace OpenSim.Framework.Types 33namespace OpenSim.Framework.Types
32{ 34{
33 public class EstateSettings 35 public class EstateSettings
@@ -554,7 +556,7 @@ namespace OpenSim.Framework.Types
554 private ConfigurationMember configMember; 556 private ConfigurationMember configMember;
555 public EstateSettings() 557 public EstateSettings()
556 { 558 {
557 configMember = new ConfigurationMember("estate_settings.xml", "ESTATE SETTINGS", this.loadConfigurationOptions, this.handleIncomingConfiguration); 559 configMember = new ConfigurationMember(Path.Combine(Util.configDir(),"estate_settings.xml"), "ESTATE SETTINGS", this.loadConfigurationOptions, this.handleIncomingConfiguration);
558 configMember.performConfigurationRetrieve(); 560 configMember.performConfigurationRetrieve();
559 } 561 }
560 562
diff --git a/OpenSim/Framework/General/Util.cs b/OpenSim/Framework/General/Util.cs
index b9f8e9c..f3e2a01 100644
--- a/OpenSim/Framework/General/Util.cs
+++ b/OpenSim/Framework/General/Util.cs
@@ -26,6 +26,7 @@
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.IO;
29using System.Security.Cryptography; 30using System.Security.Cryptography;
30using System.Net; 31using System.Net;
31using System.Text; 32using System.Text;
@@ -275,6 +276,39 @@ namespace OpenSim.Framework.Utilities
275 return null; 276 return null;
276 } 277 }
277 278
279 //
280 // directory locations
281 //
282 public static string homeDir()
283 {
284 string temp;
285// string personal=(Environment.GetFolderPath(Environment.SpecialFolder.Personal));
286// temp = Path.Combine(personal,".OpenSim");
287 temp=".";
288 return temp;
289 }
290
291 public static string configDir()
292 {
293 string temp;
294 temp = ".";
295 return temp;
296 }
297
298 public static string dataDir()
299 {
300 string temp;
301 temp = ".";
302 return temp;
303 }
304
305 public static string logDir()
306 {
307 string temp;
308 temp = ".";
309 return temp;
310 }
311
278 public Util() 312 public Util()
279 { 313 {
280 314