Use paths relative to the location of the executable and not absolute paths.
This allows the executable to be relocated without issues with the configuration files.
This commit is contained in:
@@ -15,6 +15,7 @@ using MarketData;
|
||||
using MarketData.Utils;
|
||||
using Utility=MarketData.Utils.Utility;
|
||||
|
||||
// This project must be built in 32 bit mode. Due to the size of IntPtr being 64 and not 32 as needed.
|
||||
|
||||
// Tor Current Version
|
||||
// https://www.torproject.org/download/tor/
|
||||
@@ -269,7 +270,9 @@ namespace TorWebClient
|
||||
{
|
||||
try
|
||||
{
|
||||
MDTrace.WriteLine(LogLevel.DEBUG,String.Format("Creating {0}",pathTorConfig));
|
||||
String currentWorkingDirectory = Directory.GetCurrentDirectory();
|
||||
pathTorConfig=currentWorkingDirectory+@"\Tor\Tor\"+pathTorConfig;
|
||||
MDTrace.WriteLine(LogLevel.DEBUG,String.Format("Creating {0} ",pathTorConfig));
|
||||
String pathBackupTorConfig=pathTorConfig+".bak";
|
||||
if(File.Exists(pathTorConfig))
|
||||
{
|
||||
@@ -439,7 +442,6 @@ namespace TorWebClient
|
||||
}
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("TorWebClient is running {0} bits.",Utility.Is64Bit()?64:32);
|
||||
try{Program.SetConsoleCtrlHandler(new HandlerRoutine(Program.ConsoleCtrlCheck),true);}
|
||||
catch(Exception exception){Console.WriteLine(exception.ToString());}
|
||||
if(!Utility.IsAdministrator())
|
||||
|
||||
Reference in New Issue
Block a user