mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 18:25:33 +08:00
Changes to prepare for future possible configuration of separate logdir, configdir, datadir.
This commit is contained in:
@@ -31,6 +31,7 @@ using System.Xml;
|
||||
|
||||
using OpenSim.Framework.Interfaces;
|
||||
using OpenSim.Framework.Configuration.Interfaces;
|
||||
using OpenSim.Framework.Utilities;
|
||||
|
||||
namespace OpenSim.Framework.Configuration
|
||||
{
|
||||
@@ -119,6 +120,11 @@ namespace OpenSim.Framework.Configuration
|
||||
|
||||
public void Commit()
|
||||
{
|
||||
if (!Directory.Exists(Util.configDir()))
|
||||
{
|
||||
Directory.CreateDirectory(Util.configDir());
|
||||
}
|
||||
|
||||
doc.Save(fileName);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ namespace OpenSim.Framework.Console
|
||||
}
|
||||
|
||||
System.Console.WriteLine("Logs will be saved to current directory in " + LogFile);
|
||||
|
||||
Log = File.AppendText(LogFile);
|
||||
Log.WriteLine("========================================================================");
|
||||
Log.WriteLine(componentname + " Started at " + DateTime.Now.ToString());
|
||||
|
||||
@@ -26,7 +26,9 @@
|
||||
*
|
||||
*/
|
||||
using System;
|
||||
using System.IO;
|
||||
using libsecondlife;
|
||||
using OpenSim.Framework.Utilities;
|
||||
|
||||
namespace OpenSim.Framework.Data.DB4o
|
||||
{
|
||||
@@ -45,7 +47,7 @@ namespace OpenSim.Framework.Data.DB4o
|
||||
/// </summary>
|
||||
public void Initialise()
|
||||
{
|
||||
manager = new DB4oUserManager("userprofiles.yap");
|
||||
manager = new DB4oUserManager(Path.Combine(Util.dataDir(),"userprofiles.yap"));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -25,9 +25,11 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
using System.IO;
|
||||
using libsecondlife;
|
||||
using OpenSim.Framework.Configuration;
|
||||
using OpenSim.Framework.Utilities;
|
||||
|
||||
namespace OpenSim.Framework.Types
|
||||
{
|
||||
public class EstateSettings
|
||||
@@ -554,7 +556,7 @@ namespace OpenSim.Framework.Types
|
||||
private ConfigurationMember configMember;
|
||||
public EstateSettings()
|
||||
{
|
||||
configMember = new ConfigurationMember("estate_settings.xml", "ESTATE SETTINGS", this.loadConfigurationOptions, this.handleIncomingConfiguration);
|
||||
configMember = new ConfigurationMember(Path.Combine(Util.configDir(),"estate_settings.xml"), "ESTATE SETTINGS", this.loadConfigurationOptions, this.handleIncomingConfiguration);
|
||||
configMember.performConfigurationRetrieve();
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
*
|
||||
*/
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
@@ -275,6 +276,39 @@ namespace OpenSim.Framework.Utilities
|
||||
return null;
|
||||
}
|
||||
|
||||
//
|
||||
// directory locations
|
||||
//
|
||||
public static string homeDir()
|
||||
{
|
||||
string temp;
|
||||
// string personal=(Environment.GetFolderPath(Environment.SpecialFolder.Personal));
|
||||
// temp = Path.Combine(personal,".OpenSim");
|
||||
temp=".";
|
||||
return temp;
|
||||
}
|
||||
|
||||
public static string configDir()
|
||||
{
|
||||
string temp;
|
||||
temp = ".";
|
||||
return temp;
|
||||
}
|
||||
|
||||
public static string dataDir()
|
||||
{
|
||||
string temp;
|
||||
temp = ".";
|
||||
return temp;
|
||||
}
|
||||
|
||||
public static string logDir()
|
||||
{
|
||||
string temp;
|
||||
temp = ".";
|
||||
return temp;
|
||||
}
|
||||
|
||||
public Util()
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user