ifolder/www-apps/ifolder3-enterprise/files/3.9.2/SimiasServerSetup_use_simiasconfdir_in_SetupDefaultConfigPath.patch

52 lines
2.1 KiB
Diff
Raw Permalink Normal View History

Index: simias-1.8.3.10200.stable/src/server/setup/SimiasServerSetup.cs
===================================================================
--- simias-1.8.3.10200.stable.orig/src/server/setup/SimiasServerSetup.cs 2010-07-19 12:36:57.715197193 -0400
+++ simias-1.8.3.10200.stable/src/server/setup/SimiasServerSetup.cs 2010-07-19 12:37:01.265198310 -0400
@@ -2806,14 +2806,7 @@ Console.WriteLine("Url {0}", service.Url
private bool SetupDefaultConfigPath()
{
// Check /etc first
- string path =
- String.Format( "{0}{1}{2}{3}{4}{5}",
- Path.DirectorySeparatorChar.ToString(),
- "etc",
- Path.DirectorySeparatorChar.ToString(),
- "simias",
- Path.DirectorySeparatorChar.ToString(),
- "bill" );
+ string path = Path.Combine(Simias.Client.SimiasSetup.simiasconfdir, "bill");
if ( System.IO.Directory.Exists( path ) == true )
{
if ( File.Exists( Path.Combine( path, Simias.Configuration.DefaultConfigFileName ) ) == true )
@@ -2825,13 +2818,7 @@ Console.WriteLine("Url {0}", service.Url
}
// Check the target area
- path =
- String.Format( "{0}{1}{2}{3}{4}",
- System.IO.Directory.GetCurrentDirectory(),
- Path.DirectorySeparatorChar.ToString(),
- "etc",
- Path.DirectorySeparatorChar.ToString(),
- "simias" );
+ path = Path.Combine(System.IO.Directory.GetCurrentDirectory(), Simias.Client.SimiasSetup.simiasconfdir.TrimStart(Path.DirectorySeparatorChar));
if ( System.IO.Directory.Exists( path ) == true )
{
@@ -2854,13 +2841,8 @@ Console.WriteLine("Url {0}", service.Url
int lastComp = cwd.LastIndexOf( Path.DirectorySeparatorChar );
cwd = cwd.Remove( lastComp, ( cwd.Length - lastComp ) );
- path =
- String.Format( "{0}{1}{2}{3}{4}",
- cwd,
- Path.DirectorySeparatorChar.ToString(),
- "etc",
- Path.DirectorySeparatorChar.ToString(),
- "simias" );
+ cwd = cwd + Path.DirectorySeparatorChar.ToString();
+ path = Path.Combine(cwd, Simias.Client.SimiasSetup.simiasconfdir.TrimStart(Path.DirectorySeparatorChar));
if ( System.IO.Directory.Exists( path ) == true )
{