Skip Menu |
 

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

Report information
The Basics
Id: 39949
Status: resolved
Worked: 10 min
Priority: 0/
Queue: File-Path

People
Owner: RICHE [...] cpan.org
Requestors: dmitry.bolshakov [...] bridge-quest.com
Cc:
AdminCc:

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



Subject: in cygwin and windows rmtree does not report any error if directory does not exist
Date: Fri, 10 Oct 2008 17:53:20 +0400
To: bug-File-Path [...] rt.cpan.org
From: Dmitry Bolshakov <dmitry.bolshakov [...] bridge-quest.com>
Download (untitled) / with headers
text/plain 776b
$ uname -a CYGWIN_NT-5.1 bolshakovxp 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin $ perl -v This is perl, v5.10.0 built for cygwin-thread-multi-64int (with 6 registered patches, see perl -V for more detail) $ perl -MFile::Path -e "print \$File::Path::VERSION" 2.04 ----- Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\bdimych>perl -v This is perl, v5.10.0 built for MSWin32-x86-multi-thread (with 5 registered patches, see perl -V for more detail) C:\Documents and Settings\bdimych>perl -MFile::Path -e "print $File::Path::VERSION" 2.04 ----- use File::Path; use Data::Dumper; rmtree "aaaaa", {error => \my $err}; print Dumper $err; <STDIN>; outputs $VAR1 = []; -- With best regards Dmitry Bolshakov
Download (untitled) / with headers
text/plain 938b
Created PR https://github.com/dland/File-Path/pull/5 On Fri Oct 10 09:54:09 2008, dmitry.bolshakov@bridge-quest.com wrote: Show quoted text
> $ uname -a > CYGWIN_NT-5.1 bolshakovxp 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin > > $ perl -v > This is perl, v5.10.0 built for cygwin-thread-multi-64int > (with 6 registered patches, see perl -V for more detail) > > $ perl -MFile::Path -e "print \$File::Path::VERSION" > 2.04 > > ----- > > Microsoft Windows XP [Version 5.1.2600] > (C) Copyright 1985-2001 Microsoft Corp. > > C:\Documents and Settings\bdimych>perl -v > > This is perl, v5.10.0 built for MSWin32-x86-multi-thread > (with 5 registered patches, see perl -V for more detail) > > C:\Documents and Settings\bdimych>perl -MFile::Path -e "print > $File::Path::VERSION" > 2.04 > > ----- > > use File::Path; > use Data::Dumper; > rmtree "aaaaa", {error => \my $err}; > print Dumper $err; > <STDIN>; > > outputs > > $VAR1 = []; > >
Download (untitled) / with headers
text/plain 109b
This issue has been resolved in dev release http://search.cpan.org/~riche/File-Path/Path.pm version 2.10_001.
Download (untitled) / with headers
text/plain 1.5k
I have read through this full thread a few times, and I find myself feeling pretty firmly opposed to this change. There is already a mechanism for determining whether any of the requested deletions failed, and it has been there for some time. (I am thinking, here, of the return value and the error reference.) Users already could have inspected if if they cared to, and if they did not, that is their choice, even if we would not make it the same way. If we were to change perl's core "mkdir" to warn on failure, rather than stick to its existing behavior, users would scream bloody murder. That's not the kind of change that the perl core makes lightly. File::Path is so important a piece of core ā€” and indeed was fundamentally core-only until v5.10 ā€” that I think it should try to stick to the same level of backward compatibility. But it may well be that I haven't quite grasped the motivation here. It sounds like, "users might be surprised that nothing got deleted, or why nothing got deleted," but the tools for checking this already exist, and are already documented. They're maybe not the interface we'd provide if we were starting afresh, but we're not. We're supporting decades of code with coders and maintainers who will (justifiably) scream bloody murder if we change their programs to emit warnings where they already understand the behavior. If I have misunderstood, and there is a greater issue at play, please let me know. Otherwise, the complaints here are just the tip of an iceberg, and we should avoid it by avoiding these new warnings. -- rjbs
Whoops, I have responded to the wrong ticket. :-) -- rjbs
re-closing.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.