fix macosx initialization of executable_path
parent
99cd664961
commit
a9277c71fd
|
@ -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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue