Mail Archives: djgpp-workers/2000/05/23/16:42:27
> From: "Mark E." <snowball3 AT bigfoot DOT com>
> Date: Tue, 23 May 2000 14:01:42 -0400
>
> I've been using __dosexec_find_on_path in my Bash 2.04 beta to find disk
> commands. But when LFN is available, a search for "autoconf" will return
> "autoconf.sh" when both "autoconf" and "autoconf.sh" are both in the same
> directory in a PATH. This causes 'spawnve (P_WAIT, "autoconf", args, env)' to
> execute autoconf.sh instead of autoconf. Is this the way it's supposed to
> work?
Yes, this is how it was intended to work. It favors the files with
extensions due to 2 reasons: (1) when you have `foo' (a raw COFF
image) and `foo.exe', you want the latter, because it doesn't need
go32-v2 to run; and (2) under LFN you might have foo.bar and
foo.bar.exe, so the only way to find foo.bar.exe is to try with the
extension first. In addition, DOS seems to work this way as well.
Neither of these reasons is relevant to your case. It's possible that
we don't want the .sh extension to be recognized automatically in the
same manner as we do with .exe and .com. So perhaps we need to
exclude all the extensions except .bat, .com, .exe, and .btm from that
search.
- Raw text -