pkgsrc/sysutils/p5-Mac-AppleScript-Glue/patches/patch-ab
seb ea3cae9ed8 Initial import of p5-Mac-AppleScript-Glue version 0.03 in the NetBSD
Packages Collection.

The Perl 5 module Mac::AppleScript::Glue allows you to write Perl
code in object-oriented syntax to control Mac applications. The
module does not actually execute Apple Events, but actually translates
Perl code to AppleScript code and causes it to be executed.
2010-02-18 02:56:35 +00:00

15 lines
495 B
Text

$NetBSD: patch-ab,v 1.1.1.1 2010/02/18 02:56:35 seb Exp $
Prevent division by 0 for disks with no free space.
--- t/finder.t.orig 2002-09-12 16:24:21.000000000 +0200
+++ t/finder.t
@@ -36,7 +36,7 @@ ok($disks)
for my $disk (ref($disks) eq 'ARRAY' ? @{$disks} : $disks) {
my $name = $disk->name;
- my $free = int($disk->free_space / 1024 / 1024);
+ my $free = ($disk->free_space ? int($disk->free_space / 1024 / 1024) : 0);
print "disk \"$name\" has ${free} mb free\n";
}