From e3176cb6f213a783d74d984f46ee522554c69178 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 4 Dec 2003 20:35:56 +0000 Subject: don't die horribly if the usb key partition is not vfat, catch the error and display a message accordingly --- move/move.pm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/move/move.pm b/move/move.pm index 2e5a965cc..364a0bce6 100644 --- a/move/move.pm +++ b/move/move.pm @@ -262,7 +262,7 @@ sub key_mount { } require fs; - fs::mount_part($_) foreach key_parts($o); + eval { fs::mount_part($_) } foreach key_parts($o); } sub key_umount { @@ -350,9 +350,13 @@ sub install2::verifyKey { log::l("automatic transparent key support is disabled"), return if $key_disabled; while (cat_('/proc/mounts') !~ m|\s/home\s|) { - - $o->ask_okcancel_({ title => N("Need a key to save your data"), - messages => formatAlaTeX( + + my $message = key_parts($o) ? +N("Your USB key doesn't have any valid Windows (FAT) partitions + +You may also proceed without an USB key - you'll still be +able to use Mandrake Move as a normal live Mandrake +Operating System.") : N("We didn't detect any USB key on your system. If you plug in an USB key now, Mandrake Move will have the ability to transparently save the data in your home directory and @@ -363,7 +367,9 @@ seconds before detecting again. You may also proceed without an USB key - you'll still be able to use Mandrake Move as a normal live Mandrake -Operating System.")), +Operating System."); + $o->ask_okcancel_({ title => N("Need a key to save your data"), + messages => formatAlaTeX($message), ok => N("Detect USB key again"), cancel => N("Continue without USB key") }) or return; -- cgit v1.2.1