summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-08-17 09:12:09 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-08-17 09:12:09 +0000
commit2a52d51c92dd636b40aa40d31b6859223bcec383 (patch)
tree62f2a365d75bd7be93f9952ba88a8b3d8f1d6a3f
parent2249f8c990a910f3a74a753d1ef4691c24ab0397 (diff)
downloaddrakx-2a52d51c92dd636b40aa40d31b6859223bcec383.tar
drakx-2a52d51c92dd636b40aa40d31b6859223bcec383.tar.gz
drakx-2a52d51c92dd636b40aa40d31b6859223bcec383.tar.bz2
drakx-2a52d51c92dd636b40aa40d31b6859223bcec383.tar.xz
drakx-2a52d51c92dd636b40aa40d31b6859223bcec383.zip
cleanly handle the case when {pt_type} is 0
-rw-r--r--perl-install/fs/type.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm
index 6eb7e6c12..137731c4b 100644
--- a/perl-install/fs/type.pm
+++ b/perl-install/fs/type.pm
@@ -194,7 +194,8 @@ sub part2type_name {
my ($part) = @_;
my @names = keys %type_name2fs_type;
- if (my $pt_type = $part->{pt_type} || $part->{fs_type} && $fs_type2pt_type{$part->{fs_type}}) {
+ my $pt_type = defined $part->{pt_type} ? $part->{pt_type} : $part->{fs_type} && $fs_type2pt_type{$part->{fs_type}};
+ if (defined $pt_type) {
@names = grep { $pt_type eq $type_name2pt_type{$_} } @names;
}
if (my $fs_type = $part->{fs_type} || $part->{pt_type} && $pt_type2fs_type{$part->{pt_type}}) {