X-Spam-Check-By: sourceware.org From: "Dave Korn" To: Subject: RE: default PATH Date: Wed, 8 Feb 2006 18:59:18 -0000 Message-ID: <006b01c62ce1$c3ae94a0$a501a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: <43E9ECB4.1070905@byu.net> Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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/