Skip Menu |

This queue is for tickets about the Filesys-DiskFree CPAN distribution.

Report information
The Basics
Id: 55391
Status: new
Priority: 0/
Queue: Filesys-DiskFree

People
Owner: Nobody in particular
Requestors: nep [...] noisetu.be
Cc:
AdminCc:

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



Subject: Filesys::DiskFree doesn't understand symlinks
Filesys::DiskFree doesn't understand symlinks, so extract() fails to match the path and returns data for /. The attached patch will properly resolve symlinks.
Subject: symlink.patch
--- Filesys-DiskFree-0.06/DiskFree.pm 1998-10-23 15:30:01.000000000 -0700 +++ patch/Filesys-DiskFree-0.06/DiskFree.pm 2010-03-09 15:47:47.000000000 -0800 @@ -8,6 +8,7 @@ package Filesys::DiskFree; use Carp; +use Cwd 'abs_path'; use strict; #qw(); @@ -221,6 +222,12 @@ sub extract () { my $device; if(@_) { my $thingy=shift; + + # resolve symlinks + if(-s $thingy && $thingy ne '/'){ + $thingy=abs_path($thingy); + } + if(defined($self->{'DEVICES'}{$thingy})){ $device=$thingy; } else {