From 6d5cba8e5b4f47874e8aab377b7b4181aff6faa2 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 15 Oct 2004 12:34:05 +0000 Subject: cleanup thanks to perl_checker --- perl-install/network/tools.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'perl-install/network/tools.pm') diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm index 759e6fc66..d573e41d8 100644 --- a/perl-install/network/tools.pm +++ b/perl-install/network/tools.pm @@ -199,10 +199,14 @@ sub use_floppy { my $floppy = detect_devices::floppy(); $in->ask_okcancel(N("Insert floppy"), N("Insert a FAT formatted floppy in drive %s with %s in root directory and press %s", $floppy, $file, N("Next"))) or return; - eval { fs::mount(devices::make($floppy), '/mnt', 'vfat', 'readonly'); 1 } or my $failed = N("Floppy access error, unable to mount device %s", $floppy); - log::explanations($failed || "Mounting floppy device $floppy in /mnt"); - - return '/mnt', $failed; + if (eval { fs::mount(devices::make($floppy), '/mnt', 'vfat', 'readonly'); 1 }) { + log::explanations("Mounting floppy device $floppy in /mnt"); + '/mnt'; + } else { + my $failed = N("Floppy access error, unable to mount device %s", $floppy); + log::explanations($failed); + undef, $failed; + } } -- cgit v1.2.1