Skip Menu |

This queue is for tickets about the File-Path-Tiny CPAN distribution.

Report information
The Basics
Id: 127962
Status: open
Priority: 0/
Queue: File-Path-Tiny

People
Owner: Nobody in particular
Requestors: cfaber [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: mk() returns incorrect error message.
Date: Fri, 7 Dec 2018 15:25:26 -0700
To: bug-File-Path-Tiny [...] rt.cpan.org
From: Colin Faber <cfaber [...] gmail.com>
perl -MFile::Path::Tiny -e 'File::Path::Tiny::mk("/mnt/test2", "0755") || die $!' No such file or directory at -e line 1.
On Fri Dec 07 17:26:11 2018, cfaber@gmail.com wrote: Show quoted text
> perl -MFile::Path::Tiny -e 'File::Path::Tiny::mk("/mnt/test2", "0755") || > die $!' > No such file or directory at -e line 1.
Can you send me the output of these commands on that box? 1. `ls -ld / /mnt /mnt/test` 2. `perl -MFile::Path::Tiny -E 'say $^O; say $File::Path::Tiny::VERSION; $!=20;say $!` thanks!
Subject: Re: [rt.cpan.org #127962] mk() returns incorrect error message.
Date: Wed, 12 Dec 2018 10:05:46 -0700
To: bug-File-Path-Tiny [...] rt.cpan.org
From: Colin Faber <cfaber [...] gmail.com>
Hi Daniel, dr-xr-xr-x. 20 root root 4096 Nov 4 15:55 / drwxr-xr-x. 3 root root 4096 Nov 5 2016 /mnt linux 0.8 Not a directory Specifically I've tried to generate a path in a directory which I do not have access to. This should return EACCES but I think it's returning the error when attempting to generate the second layer path rather than bailing out. On Fri, Dec 7, 2018, 3:39 PM Daniel Muey via RT < bug-File-Path-Tiny@rt.cpan.org wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=127962 > > > On Fri Dec 07 17:26:11 2018, cfaber@gmail.com wrote:
> > perl -MFile::Path::Tiny -e 'File::Path::Tiny::mk("/mnt/test2", "0755") || > > die $!' > > No such file or directory at -e line 1.
> > > Can you send me the output of these commands on that box? > > 1. `ls -ld / /mnt /mnt/test` > 2. `perl -MFile::Path::Tiny -E 'say $^O; say $File::Path::Tiny::VERSION; > $!=20;say $!` > > thanks! >
Subject: Re: [rt.cpan.org #127962] mk() returns incorrect error message.
Date: Wed, 12 Dec 2018 10:17:59 -0700
To: bug-File-Path-Tiny [...] rt.cpan.org
From: Colin Faber <cfaber [...] gmail.com>
--- File/Path/Tiny.pm 2018-12-12 10:09:35.788017644 -0700 +++ /home/cfaber/.cpan/build/File-Path-Tiny-0.8-YBFEIN/lib/File/Path/Tiny.pm 2016-01-26 13:45:37.000000000 -0700 @@ -22,7 +22,7 @@ next if ( $_dir eq '' ); my $progressive = File::Spec->catpath( $vol, File::Spec->catdir(@list), '' ); if ( !-d $progressive ) { + mkdir( $progressive, $mask ) or return; - mkdir( $progressive, $mask ) or -d $progressive or return; } } return 1 if -d $path; Because you check for $progressive before return, you're modifying the error string. On Wed, Dec 12, 2018 at 10:05 AM Colin Faber <cfaber@gmail.com> wrote: Show quoted text
> Hi Daniel, > > dr-xr-xr-x. 20 root root 4096 Nov 4 15:55 / > drwxr-xr-x. 3 root root 4096 Nov 5 2016 /mnt > linux > 0.8 > Not a directory > > Specifically I've tried to generate a path in a directory which I do not > have access to. This should return EACCES but I think it's returning the > error when attempting to generate the second layer path rather than bailing > out. > > > On Fri, Dec 7, 2018, 3:39 PM Daniel Muey via RT < > bug-File-Path-Tiny@rt.cpan.org wrote: >
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=127962 > >> >> On Fri Dec 07 17:26:11 2018, cfaber@gmail.com wrote:
>> > perl -MFile::Path::Tiny -e 'File::Path::Tiny::mk("/mnt/test2", "0755")
>> ||
>> > die $!' >> > No such file or directory at -e line 1.
>> >> >> Can you send me the output of these commands on that box? >> >> 1. `ls -ld / /mnt /mnt/test` >> 2. `perl -MFile::Path::Tiny -E 'say $^O; say $File::Path::Tiny::VERSION; >> $!=20;say $!` >> >> thanks! >>
>