Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Tue, 11 Feb 2003 18:36:45 -0500 (EST) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: "Newton, Doug" cc: cygwin AT cygwin DOT com Subject: RE: cygpath bug in version 1.25 -- Fundamental Change in the Behaviour of Cygpath In-Reply-To: Message-ID: Importance: Normal MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 11 Feb 2003, Newton, Doug wrote: > If this change is what is desired by the majority, that is fine. BUT, it > should have been made clear that the fundamental behaviour of cygpath had > changed. I have many scripts that no longer work. Even the jakarata ant > tool's start-up script now mangles the classpath because of this change in > behaviour. This change makes the output correct. I suppose that would be something desired by the majority... > At least with version 1.21 (and I believe through 1.24, just glancing > through the CVS history), the behaviour was always as follows: > > "cygpath --path --unix $UNIX_CLASSPATH" returns UNIX_CLASSPATH > "cygpath --path --unix $DOS_CLASSPATH" return UNIX_CLASSPATH > "cygpath --path --windows $UNIX_CLASSPATH" returns DOS_CLASSPATH > "cygpath --path --windows $DOS_CLASSPATH" returns DOS_CLASSPATH > > Now the behaviour is as follows: > > "cygpath --path --unix $UNIX_CLASSPATH" returns a truncated UNIX_CLASSPATH > if it is too long Yes, because it treats it as one filename... > "cygpath --path --unix $DOS_CLASSPATH" return UNIX_CLASSPATH > "cygpath --path --windows $UNIX_CLASSPATH" returns DOS_CLASSPATH > "cygpath --path --windows $DOS_CLASSPATH" returns a garbled DOS_CLASSPATH > regardless of length (e.g. the path is transformed from "C:/home/build" to > "C;c:/home/build" Yes, because it treats ":" as a separator. > We no longer have the option to run a classpath of unknown format through > cgypath to make sure it is in a known format. This is the issue in the > jakarta ant tool. It makes no assumptions on what the format of the path is > -- it immediately converts it to unix regardless of the current format. It makes an assumption that the format is Windows. Otherwise, there'd be no need to convert to Unix format... > This was the expected behaviour. > > Is there another utility that can be used to identify the format of a > classpath? This will be needed to account for the changed behaviour in > modifying scripts. > --Doug Newton > dnewton AT htc DOT net Umm, 'grep'? In particular, grep for a ";" or a "\" for a windows-format path... Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk! -- /usr/games/fortune -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/