On Tue, 11 Jul 2017 07:08:43 -0700, elizabeth wrote: > > > On 11 Jul 2017, at 15:34, Jarkko Haapalainen (via RT) <perl6-bugs- > > follo...@perl.org> wrote: > > > > # New Ticket Created by Jarkko Haapalainen > > # Please include the string: [perl #131737] > > # in the subject line of all future correspondence about this issue. > > # <URL: https://rt.perl.org/Ticket/Display.html?id=131737 > > > > > > > Problems running Perl6 programs on network drive and when using > > IO.dirname. File paths get cluttered. > > Running examples on drive Z: > > EXAMPLE: > > my $path = 'c:\foo\bar\file.txt'; > > say $path; > > say $path.IO.dirname; > > say $path.IO.absolute; > > say $path.IO.dirname.IO.absolute; > > OUTPUT: > > c:\foo\bar\file.txt > > \foo\bar > > C:\foo\bar\file.txt > > Z:\foo\bar > > ^^^ assume the Z is a typo here ???? >
No it is not :) BUT it depends what is your current drive/volume. In this example I was running script on drive Z: Any how.. I don't know if this is really a bug now, because on the documentation it says clearly https://docs.perl6.org/routine/dirname that IO.dirname excludes the volume. So if this is the case then I just need to check if IO.volume is defined and add that to path before calling IO.absolute. Though it would be nice if I shouldn't need to do that when writing this kind of cross platform code :)