diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-02-15 16:53:42 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-02-15 16:53:42 +0000 |
commit | ab8ca4ad4729ba71c7bbade59b75f051e74b009d (patch) | |
tree | b7b74294608b12a386181798811a9f27cb21ef77 /perl-install/diskdrake/interactive.pm | |
parent | 770daeb5d2b473d50d67b4e9423c2e914aed718b (diff) | |
download | drakx-ab8ca4ad4729ba71c7bbade59b75f051e74b009d.tar drakx-ab8ca4ad4729ba71c7bbade59b75f051e74b009d.tar.gz drakx-ab8ca4ad4729ba71c7bbade59b75f051e74b009d.tar.bz2 drakx-ab8ca4ad4729ba71c7bbade59b75f051e74b009d.tar.xz drakx-ab8ca4ad4729ba71c7bbade59b75f051e74b009d.zip |
replace load/save from floppy with using media_browser()
Diffstat (limited to 'perl-install/diskdrake/interactive.pm')
-rw-r--r-- | perl-install/diskdrake/interactive.pm | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index 41f0e0cc2..d58dd99e8 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -371,7 +371,14 @@ sub More { sub ReadFromFile { my ($in, $hd) = @_; - my $file = $::isStandalone ? $in->ask_file(N("Select file")) : devices::make("fd0") or return; + my ($h, $file) = ('', ''); + if ($::isStandalone) { + $file = $in->ask_file(N("Select file")) or return; + } else { + undef $h; #- help perl_checker + my $name = $hd->{device}; $name =~ s!/!_!g; + ($h, $file) = install_any::media_browser($in, '', "part_$name") or return; + } eval { catch_cdie { partition_table::load($hd, $file) } @@ -390,11 +397,14 @@ Still continue?"), 0); sub SaveInFile { my ($in, $hd) = @_; - my $file = $::isStandalone ? - $in->ask_file(N("Select file")) : - $in->ask_okcancel(N("Warning"), -N("Insert a floppy in drive -All data on this floppy will be lost"), 1) && devices::make(detect_devices::floppy()) or return; + my ($h, $file) = ('', ''); + if ($::isStandalone) { + $file = $in->ask_file(N("Select file")) or return; + } else { + undef $h; #- help perl_checker + my $name = $hd->{device}; $name =~ s!/!_!g; + ($h, $file) = install_any::media_browser($in, 'save', "part_$name") or return; + } eval { partition_table::save($hd, $file) }; if (my $err = $@) { |