fix macosx initialization of executable_path

db4
Doug Coleman 2009-01-21 18:07:26 -06:00
parent 99cd664961
commit a9277c71fd
1 changed files with 6 additions and 2 deletions

View File

@ -53,8 +53,7 @@ INLINE bool factor_arg(const F_CHAR* str, const F_CHAR* arg, CELL* value)
void init_parameters_from_args(F_PARAMETERS *p, int argc, F_CHAR **argv) void init_parameters_from_args(F_PARAMETERS *p, int argc, F_CHAR **argv)
{ {
default_parameters(p); default_parameters(p);
const F_CHAR *executable_path = vm_executable_path(); p->executable_path = argv[0];
p->executable_path = executable_path ? executable_path : argv[0];
int i = 0; int i = 0;
@ -106,6 +105,11 @@ void init_factor(F_PARAMETERS *p)
/* OS-specific initialization */ /* OS-specific initialization */
early_init(); early_init();
const F_CHAR *executable_path = vm_executable_path();
if(executable_path)
p->executable_path = executable_path;
if(p->image_path == NULL) if(p->image_path == NULL)
p->image_path = default_image_path(); p->image_path = default_image_path();