Skip Menu |

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

Report information
The Basics
Id: 56004
Status: stalled
Priority: 0/
Queue: Path-Extended

People
Owner: Nobody in particular
Requestors: MSISK [...] cpan.org
Cc:
AdminCc:

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



Subject: open directory handles cause failures
Path::Extended::Dir keeps an open directory handle in $self->{handle} after such operations as $self->children(). This is almost never the desired behavior. If a P::E::Dir is passed to any external utilities for deletion/removal, rather than relying on the native rmtree() call which calls close() first, the removal will fail on certain platforms such as Win32 since the cached open handle will cause a permission denied error. I recommend the directory class never keeping the open handle around; all operations should implicitly close()when complete.
Hello. Which version of Path::Extended are you using? $self->close has been added in $self->children since 0.10 released a year ago. It'd be nice if you post a failing test. Thanks. On 2010-3-27 Sat 15:16:38, MSISK wrote: Show quoted text
> Path::Extended::Dir keeps an open directory handle in $self->{handle} > after such operations as $self->children(). > > This is almost never the desired behavior. > > If a P::E::Dir is passed to any external utilities for deletion/
removal, Show quoted text
> rather than relying on the native rmtree() call which calls close()
first, Show quoted text
> the removal will fail on certain platforms such as Win32 since the
cached Show quoted text
> open handle will cause a permission denied error. > > I recommend the directory class never keeping the open handle around;
all Show quoted text
> operations should implicitly close()when complete.