Skip Menu |

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

Report information
The Basics
Id: 60735
Status: new
Priority: 0/
Queue: Win32-File-Object

People
Owner: Nobody in particular
Requestors: davidy [...] nationalcycle.com
Cc:
AdminCc:

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



Subject: Only works with files
The perldoc for this modules states: "The new constructor creates a new handle to the Win32 filesystem attributes of an existing file or directory." But it really only works with files. It was throwing the error: "File 'C:/tmp/path/to/directory' does not exist" when trying to modify file attributes on a folder. Here is a patch to correct the problem: diff -Naur Orig/object.pm File/object.pm --- Orig/object.pm 2010-08-25 12:06:40.000000000 -0500 +++ File/object.pm 2010-08-25 12:33:06.000000000 -0500 @@ -80,9 +80,9 @@ my $path = shift; my $autowrite = !! shift; unless ( $path ) { - Carp::croak("Did not provide a file name"); + Carp::croak("Did not provide a pathname"); } - unless ( -f $path ) { + unless ( -e $path ) { Carp::croak("File '$path' does not exist"); }