Mail Archives: cygwin/2006/02/09/11:46:05
On 08 February 2006 13:06, Eric Blake wrote:
>>>> PATH is "inherited" from my WinXP environment as usual but it is not
>>>> prepend with "/bin" like before the upgrade, and is now appended with
>>>> ".".
> According to Julien Thewys on 2/8/2006 2:58 AM:
>> Solution is to reinstall 'base-files' (see
>> http://www.cygwin.com/ml/cygwin/2006-02/msg00222.html).
>>
>> My PATH was appended with '.' because of a trailing ';' in my Windows
>> PATH.
>
> Yes, this is correct behavior, but it often catches people by surprise.
> POSIX requires an empty string in your PATH to be treated as the current
> directory, and while people are less likely to start their Windows PATH
> with ; or to have ;; in the middle, a trailing ; is pretty common from
> applications that don't know any better on Windows.
No, it's not quite correct behaviour - but the incorrectness isn't in the interpretation of $PATH, but in the way it is translated
from %PATH%.
Since POSIX semantics requires an empty path component to be treated as $CWD, but Win32 semantics require an empty path component
to be ignored, the code that translates %PATH% to $PATH is not performing the translation correctly. It should strip out empty
components from the win32 path if it wants to get a semantically-equivalent path setting. Translating an empty win32 path component
into an empty posix path component is not translating like into like.
cheers,
DaveK
--
Can't think of a witty .sigline today....
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -