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]

Perl package File::Spec confused under cygwin


File::Spec is supposed to provide a OS independent way of parsing and
creating pathnames.  For example, a 'splitpath' can product a volume
$dir and $file.  

I'm not sure what constitutes a volume but I'd think C: D: would count
as separate.

Under cygwin, it only handles/parses unix pathnames but not native
windows pathnames 'c:\windows\filename' will yield a vol='', dir='' and
filename='d:\windows\filelname' -- not what one would expect.  Using
forward slashes yields: vdf='', 'd:/windows/,'filename'.

Further use to break down the directory path into components would
yield D: as a first directory and 'windows' as a 2nd level dir. 
Note that the forward slash has now disappeared indicating what I believe
to be improper symantics as d:windows != D:\windows unless d:'s curdir
is = to the root dir.

Guess when the module detects the OS type, it needs to have a separate
type for the cygwin environment.

-linda


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