From 995ea591c5076d0a1f809f4b0c5d919db7510c88 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sun, 6 Aug 2000 23:22:23 +0000 Subject: no_comment --- perl-install/resize_fat/main.pm | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'perl-install/resize_fat') diff --git a/perl-install/resize_fat/main.pm b/perl-install/resize_fat/main.pm index 0c94586ec..c3eee9381 100644 --- a/perl-install/resize_fat/main.pm +++ b/perl-install/resize_fat/main.pm @@ -41,12 +41,17 @@ sub new($$$) { my ($type, $device, $fs_name) = @_; my $fs = { device => $device, fs_name => $fs_name } ; - resize_fat::io::open($fs); - resize_fat::boot_sector::read($fs); - $resize_fat::isFAT32 and eval { resize_fat::info_sector::read($fs) }; - resize_fat::fat::read($fs); - resize_fat::any::flag_clusters($fs); - + eval { + resize_fat::io::open($fs); + resize_fat::boot_sector::read($fs); + $resize_fat::isFAT32 and eval { resize_fat::info_sector::read($fs) }; + resize_fat::fat::read($fs); + resize_fat::any::flag_clusters($fs); + }; + if ($@) { + close $fs->{fd}; + die; + } bless $fs, $type; } -- cgit v1.2.1