diff options
author | Christian Belisle <cbelisle@mandriva.com> | 2001-11-28 15:48:24 +0000 |
---|---|---|
committer | Christian Belisle <cbelisle@mandriva.com> | 2001-11-28 15:48:24 +0000 |
commit | 686053a70522eeb886143b44d979497f912519b5 (patch) | |
tree | 082f8de1d88c57ce0633821cb06700477252655f | |
parent | 08149370de0f0493d335d94501ebb51a2ce83dcd (diff) | |
download | transfugdrake-686053a70522eeb886143b44d979497f912519b5.tar transfugdrake-686053a70522eeb886143b44d979497f912519b5.tar.gz transfugdrake-686053a70522eeb886143b44d979497f912519b5.tar.bz2 transfugdrake-686053a70522eeb886143b44d979497f912519b5.tar.xz transfugdrake-686053a70522eeb886143b44d979497f912519b5.zip |
Finished snapshot version of the file copy function
-rwxr-xr-x | transfugdrake | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/transfugdrake b/transfugdrake index 70d7694..4c1206e 100755 --- a/transfugdrake +++ b/transfugdrake @@ -29,6 +29,7 @@ use standalone; use my_gtk qw(:helpers :wrappers :ask); #use netconnect; use detect_devices; +use File::NCopy; my $i = 0; my $found = 0; @@ -100,26 +101,32 @@ step_2: # TODO Get windows listing in a listbox and home listing in another listbox (gftp like) # Automatic configuration -if($debug) { print "- Beginning automatic configuration\n"; } -$wait_configuring = $in->wait_message(_("Configuring..."), - _("Finding all documents on your Windows partition. Can take several minutes.")); +#if($debug) { print "- Beginning automatic configuration\n"; } +#$wait_configuring = $in->wait_message(_("Configuring..."), +# _("Finding all documents on your Windows partition. Can take several minutes.")); # Find documents. -if($debug) { print "-- Finding .doc files\n"; } +#if($debug) { print "-- Finding .doc files\n"; } #$output = `find @win[0] -name *.doc`; -$output = `find /home/cbelisle -name *.mp3`; +#$output = `find /home/cbelisle -name *.mp3`; -undef $wait_configuring; +#undef $wait_configuring; -if($debug) { print "- Ready to copy or link all the documents, waiting for user decision\n"; } +if($debug) { print "- Ready to copy all the documents, waiting for user decision\n"; } $::direct or $in->ask_okcancel(_("Transfug"), _(" -Do you want to copy all the c:\\My Documents to one of your user home ?"), 1) or goto step_3; - -if($debug) { print " - Linking $win/My Documents in $ENV{HOME}\n"; } +Do you want to copy all the c:\\My Documents of your user home ($ENV{HOME}) ?"), 1) or goto step_3; + +if($debug) { print " - Copying @win[1]/My Documents in $ENV{HOME}/win_backup\n"; } +$wait_configuring = $in->wait_message(_("Copying files..."), + _("Copying all files from @win[1]/My Documents to $ENV{HOME}/win_backup.")); +mkdir("$ENV{HOME}/win_backup"); +my $file = File::NCopy->new(recursive => 1); +$file->copy("@win[1]/compaq", "$ENV{HOME}/win_backup"); +undef $wait_configuring; # translators need to accord My Documents.. -link(_("@win[0]/My Documents"), $ENV{HOME}); +#_("@win[0]/My Documents"), $ENV{HOME}); #- ******************************* |