This is the mail archive of the cygwin 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 -m behaviour change


Hi, the script is attempting to determine the directory in which it
exists, so CURRENT_DIR is a bit misleading. This is so that it can
access other files in the same package relative to it (quite a common
technique I think).

Might be helpful to have some examples:

/home/dgriff> mkdir test
/home/dgriff> cd test
/home/dgriff/test> cygpath -m "file\.."
./
/home/dgriff/test> cygpath -m "file/.."
cygpath: error converting "file/.." - No such file or directory
/home/dgriff/test> cygpath -m "file\..\.."
C:/cygwin/home/dgriff/
/home/dgriff/test> cygpath -m "file/../.."
cygpath: error converting "file/../.." - No such file or directory
/home/dgriff/test> touch file
/home/dgriff/test> cygpath -m "file/../.."
cygpath: error converting "file/../.." - No such file or directory
/home/dgriff/test> cygpath -m "file\..\.."
C:/cygwin/home/dgriff/
/home/dgriff/test> mkdir dir
/home/dgriff/test> cygpath -m "dir/../.."
C:/cygwin/home/dgriff/

Note that the backslash variant always works and all of these used to
work under previous levels of cygwin.

Cheers,

Dave

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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