This is the mail archive of the
mailing list for the Cygwin project.
Re: Path conversion bug with check_case:strict
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: cygwin-developers at cygwin dot com
- Date: Tue, 7 Sep 2004 19:12:41 +0200
- Subject: Re: Path conversion bug with check_case:strict
- References: <Pine.GSO.firstname.lastname@example.org>
- Reply-to: cygwin-developers at cygwin dot com
On Sep 7 12:32, Igor Pechtchanski wrote:
> I've been tracking down some weird behavior on my machine. Basically,
> when a windows program is invoked from a Cygwin one, the PATH got
> truncated at the first "/cygdrive/*" entry. To reproduce, add
> "check_case:strict" to $CYGWIN, change one of the default Windows PATH
> entries to have incorrect case, run "cmd" from bash, and observe that
> "echo %PATH%" prints a truncated PATH.
> I finally managed to find the culprit: path_conv::check will break off
> converting the path if it contains a directory with the wrong case and
> check_case is set to strict. The call sequence, AFAICS, is as follows:
> (I have a full gdb stack trace if needed).
> I'm not quite sure what the right fix for this would be, as
> path_conv::check is a pretty generic method called all over the place, and
> this particular call sequence has nothing special to identify it. My
> guess at the fix would be to save the value of pcheck_case in build_env,
> set it to PCHECK_RELAXED, do the conversion, and then restore it. What do
> people think? If this is an acceptable solution, I'll start the process
> of sending in a patch.
What about adding a value to enum pathconv_arg, say PC_IGNORE_CASE or so,
which could be added to calls to path_conf? Temporary changing the value
of pcheck_case doesn't sound exactly thread safe.
Sigh, check_case is just another invention I'd rather like to get rid of.
Like ntea or textmode...
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader mailto:email@example.com
Red Hat, Inc.