Ticket #4563 (closed enhancement: fixed)

Opened 4 months ago

Last modified 3 months ago

Why no reget option in interrupted FTP move operations?

Reported by: cri Owned by: andrew_b
Priority: minor Milestone: 4.8.32
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

While copying (F5) files via FTP, if the operation is interrupted and restarted, we have the option to "reget" the file, instead of overwriting the partially transfered file.

Why there is no such option for move (F6) operations?

Change History

comment:1 Changed 4 months ago by andrew_b

This is not specific for FTP.

The "Reget" option is available for copy operation only. This was done in [c7c30731331abca37d468416a2e8f0443deb6b40] in 2004. I can't say why.

comment:2 Changed 4 months ago by zaytsev

Here is the thread:

https://mail.gnome.org/archives/mc-devel/2004-January/msg00032.html

Somehow Pavel was of the opinion, that this option doesn't make sense while moving. Not sure why, but obviously for UI/design reasons and not any technical reasons.

I think we can reintroduce it, since append option is present for both. Only it has to work correctly. The old code was wrong (see the thread - reget worked like append).

comment:3 Changed 4 months ago by cri

  • Type changed from defect to enhancement

Thanks for the pointer. If there are no technical reasons to prevent it, it would be nice to have.

I'm not sure I can help, I can only confirm that current implementation of reget in the copy use case works ok (I use it almost daily, thanks to a buggy external ftp server)

comment:4 Changed 4 months ago by zaytsev

Well, you could make a patch, Andrew linked the place in the code, it should be not too complicated.

comment:5 Changed 4 months ago by andrew_b

  • Status changed from new to accepted
  • Owner set to andrew_b
  • Branch state changed from no branch to on review
  • Milestone changed from Future Releases to 4.8.32

comment:6 Changed 4 months ago by zaytsev

Code looks good to me, didn't test - cri, can you test?

comment:7 Changed 4 months ago by cri

I've just tested and it works ok for me, thanks!

comment:8 Changed 4 months ago by zaytsev

  • Votes for changeset set to zaytsev
  • Branch state changed from on review to approved

comment:9 Changed 4 months ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from zaytsev to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

comment:10 Changed 4 months ago by andrew_b

  • Status changed from testing to closed

comment:11 Changed 3 months ago by cri

A very small reget bug I only noticed now: when doing a "reget", the ETA time is always overestimated; I haven't looked at the code, but it seems the ETA is wrongly computed using the size of the whole file; of course it should be computed only on the remaining part still to be transferred.

comment:12 Changed 3 months ago by zaytsev

But this should be then universal, so not only FTP transfer and was present before, right?

comment:13 Changed 3 months ago by andrew_b

For ETA, the appropriated ticket is #3205.

Note: See TracTickets for help on using tickets.