Martin Liška <mli...@suse.cz> writes:
>  #endif
> +      /* Do not search original location in the same folder.  */
> +      char *exe_folder = lrealpath (av[0]);
> +      exe_folder[strlen (exe_folder) - strlen (lbasename (exe_folder))] = 
> '\0';
> +      char *location = concat (exe_folder, PERSONALITY, NULL);

Does that really work? When the executable is found in $PATH
av[0] does not contain the full path name. But you seem to assume
it does?

-Andi

> +
> +      if (access (location, X_OK) == 0)
> +     remove_prefix (exe_folder, &path);

Reply via email to