- strip the config filename from the initial directory (win32 only)
This commit is contained in:
parent
d5362faede
commit
97476a00e1
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: main.cc,v 1.269 2004-02-14 06:33:29 danielg4 Exp $
|
||||
// $Id: main.cc,v 1.270 2004-02-17 21:40:05 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -2247,8 +2247,12 @@ bx_init_main (int argc, char *argv[])
|
||||
if (load_rcfile) {
|
||||
/* parse configuration file and command line arguments */
|
||||
#ifdef WIN32
|
||||
LPTSTR *filepart;
|
||||
int length;
|
||||
if (bochsrc_filename != NULL) {
|
||||
lstrcpy(bx_startup_flags.initial_dir, bochsrc_filename);
|
||||
GetFullPathName(bochsrc_filename, MAX_PATH, bx_startup_flags.initial_dir, filepart);
|
||||
length = lstrlen(bx_startup_flags.initial_dir) - lstrlen(*filepart);
|
||||
bx_startup_flags.initial_dir[length] = 0;
|
||||
} else {
|
||||
bx_startup_flags.initial_dir[0] = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user