This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: cygpath returns garbage if DOS/win2k input environment variable is too long?


Ralf,

In addition to the need to use "-p" in this case (which I mentioned earlier--you did see that message, didn't you?), you should quote your $CLASSPATH variable reference.

You might want to scrutinize you scripts to make sure they're "space-tolerant." Many Unix-land scripts are written under the assumption that there are no characters in variable names and arguments that are special to the shell that interprets that script. Under Windows, this is often a bad assumption and a space is the most common (but by no means the only) character that violates that assumption.

Note that it's not easy for "cygpath" to issue errors when you misuse it, since anything you pass in can be converted between Unix and Windows or DOS formats. But if you ask it to perform the wrong conversion, you shouldn't expect the right result. About the only diagnostic it could provide would be for the use of characters that are forbidden in Windows file names (\, /, :, *, ?, <, >, |).


Randall Schulz
Mountain View, CA USA


At 09:55 2002-09-25, Ralf Hauser wrote:
Thx! Unfortunately still only the same garbage in the mylog file.
Apparently, no warning goes to stderr?

> -----Original Message-----
> From: Joshua Daniel Franklin [mailto:joshuadfranklin@yahoo.com],
cygwin@cygwin.com
> Sent: Mittwoch, 25. September 2002 18:44
> --- Ralf Hauser <ralfhauser@gmx.ch> wrote:
> > 1) is there a way to see an error-message from cygpath (a log
> file or some
> > way to see stderr if there is any of that)?
> > 2) I did a work-around with assembling the path again in my
> .tcshrc. This is
> > not convenient. Any better ideas...?
>
> My only thought is to wrap the cygpath command in a shell script:
>
> cygpath --unix $CLASSPATH 2>&1 >>mylog
>
> cygpath uses the MAXPATH (1024 for win9x??)

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]