aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/General/Util.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/General/Util.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/OpenSim/Framework/General/Util.cs b/OpenSim/Framework/General/Util.cs
index fe4ce29..0c9a290 100644
--- a/OpenSim/Framework/General/Util.cs
+++ b/OpenSim/Framework/General/Util.cs
@@ -44,6 +44,8 @@ namespace OpenSim.Framework.Utilities
44 private static object XferLock = new object(); 44 private static object XferLock = new object();
45 private static Dictionary<LLUUID, string> capsURLS = new Dictionary<LLUUID, string>(); 45 private static Dictionary<LLUUID, string> capsURLS = new Dictionary<LLUUID, string>();
46 46
47 private static bool m_useExecutePath;
48
47 public static ulong UIntsToLong(uint X, uint Y) 49 public static ulong UIntsToLong(uint X, uint Y)
48 { 50 {
49 return Helpers.UIntsToLong(X, Y); 51 return Helpers.UIntsToLong(X, Y);
@@ -295,12 +297,22 @@ namespace OpenSim.Framework.Utilities
295 // 297 //
296 // directory locations 298 // directory locations
297 // 299 //
300
301 public static void changeUseExecutePathSetting(bool setting)
302 {
303 m_useExecutePath = setting;
304 }
305
298 public static string homeDir() 306 public static string homeDir()
299 { 307 {
300 string temp; 308 string temp;
301// string personal=(Environment.GetFolderPath(Environment.SpecialFolder.Personal)); 309// string personal=(Environment.GetFolderPath(Environment.SpecialFolder.Personal));
302// temp = Path.Combine(personal,".OpenSim"); 310// temp = Path.Combine(personal,".OpenSim");
303 temp="."; 311 temp=".";
312 if (m_useExecutePath)
313 {
314 temp = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
315 }
304 return temp; 316 return temp;
305 } 317 }
306 318
@@ -308,6 +320,10 @@ namespace OpenSim.Framework.Utilities
308 { 320 {
309 string temp; 321 string temp;
310 temp = "."; 322 temp = ".";
323 if (m_useExecutePath)
324 {
325 temp = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
326 }
311 return temp; 327 return temp;
312 } 328 }
313 329
@@ -315,6 +331,10 @@ namespace OpenSim.Framework.Utilities
315 { 331 {
316 string temp; 332 string temp;
317 temp = "."; 333 temp = ".";
334 if (m_useExecutePath)
335 {
336 temp = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
337 }
318 return temp; 338 return temp;
319 } 339 }
320 340
@@ -322,6 +342,10 @@ namespace OpenSim.Framework.Utilities
322 { 342 {
323 string temp; 343 string temp;
324 temp = "."; 344 temp = ".";
345 if (m_useExecutePath)
346 {
347 temp = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
348 }
325 return temp; 349 return temp;
326 } 350 }
327 351