Opened 6 years ago
Last modified 5 years ago
#187 new defect
File::Spec->rel2abs gets current working dfirectory for wrong drive
Reported by: | Shmuel (Seymour J.) Metz | Owned by: | |
---|---|---|---|
Priority: | Feedback pending | Milestone: | |
Component: | *none | Version: | |
Severity: | medium | Keywords: | Perl, CWD, File::Spec |
Cc: |
Description
A call to File::Spec->rel2abs with an explicit drives returns a file specification with the CWD of the current drive instead of the CWD of the specified drive. See
http://mantis.smedley.id.au/view.php?id=543
https://rt.cpan.org/Public/Bug/Display.html?id=75319
I currently have a partial power outage and can't test Cwd->abs_path against your build.
Attachments (3)
Change History (5)
by , 6 years ago
Attachment: | testrel2abs.cmd added |
---|
comment:1 by , 5 years ago
Priority: | minor → Feedback pending |
---|
please verify against win or linux and see how it behaves there.
comment:2 by , 5 years ago
There is no syntax for drive in Linux. As for windows, File::Spec::Win32 has code that should work, as noted in https://rt.cpan.org/Public/Bug/Display.html?id=75319:
"The logic for in File::Spec::Win32 is applicable to OS/2, although the
API is different. Also, in OS/2 the expression CMD /c CD $drive:
will
return the current directory for drive $drive.
I'm not sure whether it is best to copy code from File::Spec::Win32 into
File::Spec::OS2, subclass it or to make explicit calls to the win32
versions of various routines. I'm also not sure whether performance will
be adequate using the CD hack above or whether the XS code is really
needed. I can attempt to put a fix together if someone can provide style
guidance and help with the XS."
by , 5 years ago
Implementation notes on suggested fix - somewhat dated, but the OS/2 API hasn't changed
Script to run test program with messages showing expected results