mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-22 17:12:25 -05:00
Fix the 'ClassicalSharp.exe needs to be in the same folder' message incorrectly showing when starting the client via terminal on non-windows from another directory. (Thanks MrGoober)
This commit is contained in:
parent
202b6a99aa
commit
99018cc610
1 changed files with 3 additions and 2 deletions
|
@ -16,12 +16,13 @@ namespace Launcher {
|
|||
|
||||
[STAThread]
|
||||
static void Main( string[] args ) {
|
||||
if( !File.Exists( "ClassicalSharp.exe" ) ) {
|
||||
AppDirectory = AppDomain.CurrentDomain.BaseDirectory;
|
||||
string clientPath = Path.Combine( AppDirectory, "ClassicalSharp.exe" );
|
||||
if( !File.Exists( clientPath ) ) {
|
||||
MessageBox.Show( "ClassicalSharp.exe needs to be in the same folder as the launcher.", "Missing file" );
|
||||
return;
|
||||
}
|
||||
|
||||
AppDirectory = AppDomain.CurrentDomain.BaseDirectory;
|
||||
string logPath = Path.Combine( AppDirectory, "launcher.log" );
|
||||
AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionHandler;
|
||||
ErrorHandler2.InstallHandler( logPath );
|
||||
|
|
Loading…
Reference in a new issue