This is the mail archive of the
mailing list for the Cygwin project.
RE: cygpath returns garbage if DOS/win2k input environment variable is too long?
- From: Randall R Schulz <rrschulz at cris dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 25 Sep 2002 10:22:40 -0700
- Subject: RE: cygpath returns garbage if DOS/win2k input environment variable is too long?
- References: <email@example.com>
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 (\,
/, :, *, ?, <, >, |).
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:firstname.lastname@example.org],
> Sent: Mittwoch, 25. September 2002 18:44
> --- Ralf Hauser <email@example.com> 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