Skip Menu |

This queue is for tickets about the Sys-Filesystem CPAN distribution.

Report information
The Basics
Id: 56504
Status: resolved
Priority: 0/
Queue: Sys-Filesystem

People
Owner: Nobody in particular
Requestors: brettski [...] bakuna.net
Cc:
AdminCc:

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



Subject: Special Filesystems not identified correctly in Linux
Special Filesystems are not identified correctly on Linux. For example, the example code below identifies /sys as a regular filesystem. The problem appears to be caused by a typo on line 139 of lib/Sys/Filesystem/Unix.pm. I suspect that this issue affects other flavours of unix, however, I'm currently unable to test that. A patch file which fixes the problem has been attached. Example code follows: use Sys::Filesystem; my $fsh = Sys::Filesystem->new; if ($fsh->special("/sys")) { print "/sys is special\n"; } else { print "/sys is not special\n"; }
Subject: Sys-Filesystem-1.27-special-fix.patch
diff -c -r Sys-Filesystem-1.27/lib/Sys/Filesystem/Unix.pm Sys-Filesystem-mod/lib/Sys/Filesystem/Unix.pm *** Sys-Filesystem-1.27/lib/Sys/Filesystem/Unix.pm 2010-02-20 07:05:07.000000000 -0500 --- Sys-Filesystem-mod/lib/Sys/Filesystem/Unix.pm 2010-04-12 01:15:33.847586426 -0400 *************** *** 134,142 **** if ( defined( $pridx->[2] ) ) { ! my $vfs_type; ! $vfs_type = $self->{ $vals[ $pridx->[1] ] }->{fs_vfstype} = $vals[ $pridx->[2] ]; ! $self->{ $vals[ $pridx->[1] ] }->{special} = 1 if ( defined( $special_fs->{vfs_types} ) ); } else { --- 134,141 ---- if ( defined( $pridx->[2] ) ) { ! my $vfs_type = $self->{ $vals[ $pridx->[1] ] }->{fs_vfstype} = $vals[ $pridx->[2] ]; ! $self->{ $vals[ $pridx->[1] ] }->{special} = 1 if ( defined( $special_fs->{$vfs_type} ) ); } else {
Fixed, thanks. Unified diffs (diff -u) are easier to apply (especially when source has changed before).
Patch is included in 1.28 (and it seems to cause issues on MacOS X, but I'll debug it later).