diff options
author | Pascal Terjan <pterjan@mandriva.org> | 2009-10-08 15:11:19 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mandriva.org> | 2009-10-08 15:11:19 +0000 |
commit | 08824dd03d0fa3afb352e8a6b7e1d35fb03cf50b (patch) | |
tree | d4ac83387a701ae59f28f7e496d05e435d09473d /perl-install/fs | |
parent | c714e2f937473c686a888125c502faf28c34796b (diff) | |
download | drakx-backup-do-not-use-08824dd03d0fa3afb352e8a6b7e1d35fb03cf50b.tar drakx-backup-do-not-use-08824dd03d0fa3afb352e8a6b7e1d35fb03cf50b.tar.gz drakx-backup-do-not-use-08824dd03d0fa3afb352e8a6b7e1d35fb03cf50b.tar.bz2 drakx-backup-do-not-use-08824dd03d0fa3afb352e8a6b7e1d35fb03cf50b.tar.xz drakx-backup-do-not-use-08824dd03d0fa3afb352e8a6b7e1d35fb03cf50b.zip |
do not fail when a windows partition is corrupted
Diffstat (limited to 'perl-install/fs')
-rw-r--r-- | perl-install/fs/partitioning_wizard.pm | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/perl-install/fs/partitioning_wizard.pm b/perl-install/fs/partitioning_wizard.pm index d27fc7369..f10e26f37 100644 --- a/perl-install/fs/partitioning_wizard.pm +++ b/perl-install/fs/partitioning_wizard.pm @@ -125,20 +125,25 @@ sub partitionWizardSolutions { undef $part; } if ($part) { - my $min_win = do { + my $min_win = eval { my $_w = $in->wait_message(N("Resizing"), N("Computing the size of the Microsoft Windows® partition")); $resize_fat->min_size; }; - #- make sure that even after normalizing the size to cylinder boundaries, the minimun will be saved, - #- this save at least a cylinder (less than 8Mb). - $min_win += partition_table::raw::cylinder_size($hd); - - if ($part->{size} <= $min_linux + $min_swap + $min_freewin + $min_win) { -# die N("Your Microsoft Windows® partition is too fragmented. Please reboot your computer under Microsoft Windows®, run the ``defrag'' utility, then restart the Mandriva Linux installation."); + if($@) { + log::l("The FAT resizer is unable to get minimal size for $part->{device} partition %s", formatError($@)); undef $part; } else { - $part->{resize_fat} = $resize_fat; - $part->{min_win} = $min_win; + #- make sure that even after normalizing the size to cylinder boundaries, the minimun will be saved, + #- this save at least a cylinder (less than 8Mb). + $min_win += partition_table::raw::cylinder_size($hd); + + if ($part->{size} <= $min_linux + $min_swap + $min_freewin + $min_win) { +# die N("Your Microsoft Windows® partition is too fragmented. Please reboot your computer under Microsoft Windows®, run the ``defrag'' utility, then restart the Mandriva Linux installation."); + undef $part; + } else { + $part->{resize_fat} = $resize_fat; + $part->{min_win} = $min_win; + } } } $part || (); |