File copy related bugs

Pavel Roskin proski at gnu.org
Thu Oct 24 20:13:05 UTC 2002


Hello!

> I've just discovered some more bugs...

Thanks!

> 1. * 'Options->Configuration->Compute totals' and
>      'Options->Configuration->Verbose operation' are enabled.
>    * BUG: totals are not computed when copying _single directory_
>           (if _two ore more dirs_ are copied, then all is ok).

Known bug, listed in src/TODO, "before 4.6.1" section:

Totals are not calculated when operating on a single directory.

> 2. * start copying of many files (actually, two dirs with many files)
>    * press 'Skip' button during copying
>    * choose some some answer for 'Incomplete file was retrieved. Keep
>      it?' question. The copying continues after that.
>    * BUG: press left/right arrows to highlight one or another button.
>           You likely to see the same question again, although you have
>           not activated the buttons.

Yes, I can reproduce it.

Two hours later...

It was hard.  My head hurts.  All that code really needs to be cleaned up.  
Debugging it is not fun.  I'm applying this patch.

==============================
--- ChangeLog
+++ ChangeLog
@@ -1 +1,7 @@
+2002-10-24  Pavel Roskin  <proski at gnu.org>
+
+	* filegui.c (check_progress_buttons): Reinitialize ret_value to
+	avoid old values after incomplete events.
+	Reported by Dmitry Semyonov <Dmitry.Semyonov at oktet.ru>
+
 2002-10-24  Andrew V. Samoilov  <sav at bcs.zp.ua>
--- filegui.c
+++ filegui.c
@@ -170,6 +170,10 @@ check_progress_buttons (FileOpContext *c
     c = get_event (&event, 0, 0);
     if (c == EV_NONE)
       return FILE_CONT;
+
+    /* Reinitialize to avoid old values after incomplete events */
+    ui->op_dlg->ret_value = FILE_CONT;
+
     dlg_process_event (ui->op_dlg, c, &event);
     switch (ui->op_dlg->ret_value) {
     case FILE_SKIP:
==============================


> 3. Why copy dialog buttons are different for different
>    'Verbose operation' modes? I mean, 'Abort' button is not presented if
>    'Verbose operation' is disabled. Well, just found, that it is here
>    actually, but not displayed, untill you press right arrow...

Yes, very ugly.  Too many options, too few testers, and most importantly,
too few developers.  I'll try to fix it, but you can try it too.

-- 
Regards,
Pavel Roskin




More information about the mc-devel mailing list