View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000521 | Perl for OS/2 | Bug | public | 2012-01-19 11:53 | 2020-08-31 10:00 |
Reporter | shmuel | Assigned To | psmedley | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | AMD dual core | OS | eComStation | OS Version | 2.0 GA |
Summary | 0000521: File::Spec->rel2abs gets current working dfirectory for wrong drive | ||||
Description | If a file specifies a drvie and a relative path, File::Spec->rel2abs appends the current directory for the current drive instead of for the specified drive. This was fixed for win32 but not for OS/2. | ||||
Steps To Reproduce | Revise the code below to reflect the drive that you will be running it from. Change the working directory for that drive, and make a different drive current. Change the working directory for the current drive to any directory that doesn't have the same name as the program directory. use File::Spec; print "\nFile::Spec->rel2abs(testpl.cmd) = ", File::Spec->rel2abs('H:testpl.cmd'); | ||||
Additional Information | Needs OS/2 code similar to the win32 code in cwd.pm, cwd.xs and File\Spec\OS2.pm to call DosQueryCurrentDir. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
|
I've made some changes to try and make OS/2 behave like win32. Bear in mind I know NOTHING about perl syntax - can you provide me a simple testcase to test the code? Sorry but I don't understand what the above code is supposed to output |
|
use File::Spec; print "\nFile::Spec->rel2abs(H:testpl.cmd) = ", File::Spec->rel2abs('H:testpl.cmd'); should display the complete path for test.pl in the current working directoy of H:. To set it, change the code to specify a drive that exists on your system, set a working directory on that drive, change to a different drive and set a different directory on that drive. The current File::Spec->rel2abs allegedly works correctly in windoze, displaying the path with the current working directory for the specified drive, but in OS/2 it uses the current directory for the current drive. |
|
I think this is fixed in my latest build: perl is in u:\perl5 telrel2abs.pl is run from e:\downloads & the output is: [E:\downloads]perl testrel2abs.pl File::Spec->rel2abs(F:testpl.cmd) = E:/downloads/testpl.cmd |
|
New test build is at http://smedley.id.au/perl-5.14.2-os2-20120126.zip |
|
I didn't read your report fully, seems it is NOT fixed |
|
See <https://rt.cpan.org/Public/Bug/Display.html?id=75319>; I'm considering trying to work up a fix but I'm not comfortable with XS. |
|
I wonder if this is related to http://svn.netlabs.org/libc/ticket/237#comment:8 |
|
No, the problem is definitely in the Perl code for PathTools. I haven't gotten any feedback in <https://rt.cpan.org/Public/Bug/Display.html?id=75319>, so I'll probably hack a fix and see if they accept it. |
|
This should be fixed in latest Perl/2 builds |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-01-19 11:53 | shmuel | New Issue | |
2012-01-22 08:47 | psmedley | Note Added: 0002187 | |
2012-01-22 13:11 | shmuel | Note Added: 0002189 | |
2012-01-22 13:13 | shmuel | File Added: testrel2abs.cmd | |
2012-01-22 13:13 | shmuel | File Added: testrel2abs.pl | |
2012-01-26 08:12 | psmedley | Note Added: 0002196 | |
2012-01-26 08:14 | psmedley | Note Added: 0002197 | |
2012-01-26 08:19 | psmedley | Note Added: 0002200 | |
2012-03-06 22:01 | shmuel | Note Added: 0002223 | |
2012-03-16 01:53 | psmedley | Note Added: 0002224 | |
2012-03-16 17:58 | shmuel | Note Added: 0002225 | |
2020-08-31 10:00 | psmedley | Assigned To | => psmedley |
2020-08-31 10:00 | psmedley | Status | new => closed |
2020-08-31 10:00 | psmedley | Resolution | open => fixed |
2020-08-31 10:00 | psmedley | Note Added: 0003528 |