This is the mail archive of the
mailing list for the Cygwin project.
cygpath output unnecessary ending slash/
- From: Lenik <lenik at bodz dot net>
- To: cygwin at cygwin dot com
- Date: Thu, 01 Oct 2009 16:23:57 +0800
- Subject: cygpath output unnecessary ending slash/
When specify --windows or --mixed form, cygpath will append `/' to the
result path when it is a directory, this is unnecessary and
inconformity, for example:
cygpath -u some/dir
cygpath -m some/dir
cygpath -w .
The ending `\' is only needed when the win32 path points to the drive
root, for example /cygdrive/c => C:\, and even this is not a must,
because in most cases the path will join another path segment `cygpath
-w /cygdrive/c`/path/segment and the slash after the drive letter is
A severe problem with the ending back-slash \ is it will cause to escape
the following quote (", ') character,
if [ "$cygwin" = "true" ] ; then
PROJECT_HOME=`cygpath -w "$PWD"`
# do with "$PROJECT_HOME" ...
The PROJECT_HOME looks like "T:\TEMP\" and it cause the following
statement can't be parsed correctly:
# do with "T:\TEMP\" ...
the \" is escaped, then
/mnt/t/apache-forrest-0.8/tools/ant/bin/ant: eval: line 301: unexpected
EOF while looking for matching `"'
/mnt/t/apache-forrest-0.8/tools/ant/bin/ant: eval: line 302: syntax
error: unexpected end of file
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple