}
# Internal function to enumerate all available slots. Slots are described by
-# integers.
+# strings.
sub _all_slots {
my ($self) = @_;
my $dir = _quote_glob($self->{'dir'});
push @slots, $slot + 0;
}
- return sort @slots;
+ return map { "$_"} sort { $a <=> $b } @slots;
}
# Internal function to determine whether a slot exists.
#check if process is alive
my $pid = $state->{drives}->{$drive}->{pid};
- if (defined $pid && !Amanda::Util::is_pid_alive($pid)) {
+ if (!defined $pid or !Amanda::Util::is_pid_alive($pid)) {
unlink("$drive/data")
or warn("Could not unlink '$drive/data': $!");
rmdir("$drive")