aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/AssetServer/Main.cs
diff options
context:
space:
mode:
authorBrian McBee2007-08-03 18:01:55 +0000
committerBrian McBee2007-08-03 18:01:55 +0000
commit599a6d32eebc451f9284db8e6abf2946f236d5e9 (patch)
tree60ca29aaa58b0cf34b5f0514c95229602036895c /OpenSim/Grid/AssetServer/Main.cs
parentYet another commit related to the SceneObject rewrites. (diff)
downloadopensim-SC_OLD-599a6d32eebc451f9284db8e6abf2946f236d5e9.zip
opensim-SC_OLD-599a6d32eebc451f9284db8e6abf2946f236d5e9.tar.gz
opensim-SC_OLD-599a6d32eebc451f9284db8e6abf2946f236d5e9.tar.bz2
opensim-SC_OLD-599a6d32eebc451f9284db8e6abf2946f236d5e9.tar.xz
Changes to prepare for future possible configuration of separate logdir, configdir, datadir.
Diffstat (limited to 'OpenSim/Grid/AssetServer/Main.cs')
-rw-r--r--OpenSim/Grid/AssetServer/Main.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs
index 92d5490..b581a1e 100644
--- a/OpenSim/Grid/AssetServer/Main.cs
+++ b/OpenSim/Grid/AssetServer/Main.cs
@@ -34,6 +34,7 @@ using libsecondlife;
34using OpenSim.Framework.Console; 34using OpenSim.Framework.Console;
35using OpenSim.Framework.Types; 35using OpenSim.Framework.Types;
36using OpenSim.Framework.Servers; 36using OpenSim.Framework.Servers;
37using OpenSim.Framework.Utilities;
37 38
38namespace OpenSim.Grid.AssetServer 39namespace OpenSim.Grid.AssetServer
39{ 40{
@@ -71,7 +72,11 @@ namespace OpenSim.Grid.AssetServer
71 72
72 private OpenAsset_Main() 73 private OpenAsset_Main()
73 { 74 {
74 m_console = new LogBase("opengrid-AssetServer-console.log", "OpenAsset", this, false); 75 if(!Directory.Exists(Util.logDir()))
76 {
77 Directory.CreateDirectory(Util.logDir());
78 }
79 m_console = new LogBase((Path.Combine(Util.logDir(),"opengrid-AssetServer-console.log")), "OpenAsset", this, false);
75 MainLog.Instance = m_console; 80 MainLog.Instance = m_console;
76 } 81 }
77 82
@@ -154,10 +159,11 @@ namespace OpenSim.Grid.AssetServer
154 159
155 public void setupDB() 160 public void setupDB()
156 { 161 {
157 bool yapfile = File.Exists("gridassets.yap"); 162 string yappath=(Path.Combine(Util.dataDir(),"gridassets.yap"));
163 bool yapfile = File.Exists(yappath);
158 try 164 try
159 { 165 {
160 db = Db4oFactory.OpenFile("gridassets.yap"); 166 db = Db4oFactory.OpenFile(yappath);
161 MainLog.Instance.Verbose("storage", "Main.cs:setupDB() - creation"); 167 MainLog.Instance.Verbose("storage", "Main.cs:setupDB() - creation");
162 } 168 }
163 catch (Exception e) 169 catch (Exception e)