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]

cygpath -a anomaly


With cygdrive prefix = /, from the root directory of a drive (e.g.,
/c = c:\ or /h = h:\), when asking for the absolute unix path with -au,
cygpath doubles the / between the drive letter and the first directory
of the path.

  /h> echo Home | cygpath -au -f -
  /h//Home
  /h> echo Home | cygpath -aw -f -
  h:\Home

This does not happen when one is not in the root directory of the drive.

  /h> cd Home
  /h/Home> echo cartoons | cygpath -au -f -
  /h/Home/cartoons
  /h/Home> echo cartoons | cygpath -aw -f -
  h:\Home\cartoons

This does not happen when

  /h> cd ..
  /h> echo Home\\cartoons | cygpath -au -f -
  /h//Home/cartoons
  /h> echo Home/cartoons | cygpath -aw -f -
  h:\Home\cartoons

This is with cygwin 1.5, everything up to date.  Note that this also
happens on C:.  Cygwin is in c:\\cygwin.

- Barry
  Disclaimer: Statements made herein are not made on behalf of NIAID.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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]