summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/network/tools.pm15
1 files changed, 9 insertions, 6 deletions
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index a35896766..964c380f9 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -183,12 +183,15 @@ sub use_windows {
my ($file) = @_;
my $all_hds = fsedit::get_hds({}, undef);
fs::get_info_from_fstab($all_hds);
- my $part = find { $_->{device_windobe} eq 'C' } fs::get::fstab($all_hds);
- $part or my $failed = N("No partition available");
- my $source = find { -d $_ && -r "$_/$file" } map { "$part->{mntpoint}/$_" } qw(windows/system winnt/system windows/system32/drivers winnt/system32/drivers);
- log::explanations($failed || "Seek in $source to find firmware");
-
- return $source, $failed;
+ if (my $part = find { $_->{device_windobe} eq 'C' } fs::get::fstab($all_hds)) {
+ my $source = find { -d $_ && -r "$_/$file" } map { "$part->{mntpoint}/$_" } qw(windows/system winnt/system windows/system32/drivers winnt/system32/drivers);
+ log::explanations("Seek in $source to find firmware");
+ $source;
+ } else {
+ my $failed = N("No partition available");
+ log::explanations($failed);
+ undef, $failed;
+ }
}
sub use_floppy {