summaryrefslogtreecommitdiffstats
path: root/perl-install/diskdrake
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-02-15 16:53:42 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-02-15 16:53:42 +0000
commitab8ca4ad4729ba71c7bbade59b75f051e74b009d (patch)
treeb7b74294608b12a386181798811a9f27cb21ef77 /perl-install/diskdrake
parent770daeb5d2b473d50d67b4e9423c2e914aed718b (diff)
downloaddrakx-backup-do-not-use-ab8ca4ad4729ba71c7bbade59b75f051e74b009d.tar
drakx-backup-do-not-use-ab8ca4ad4729ba71c7bbade59b75f051e74b009d.tar.gz
drakx-backup-do-not-use-ab8ca4ad4729ba71c7bbade59b75f051e74b009d.tar.bz2
drakx-backup-do-not-use-ab8ca4ad4729ba71c7bbade59b75f051e74b009d.tar.xz
drakx-backup-do-not-use-ab8ca4ad4729ba71c7bbade59b75f051e74b009d.zip
replace load/save from floppy with using media_browser()
Diffstat (limited to 'perl-install/diskdrake')
-rw-r--r--perl-install/diskdrake/interactive.pm22
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 = $@) {