File remained selected after overwrite

Moderators: Hacker, petermad, Stefan2, white

Post Reply
browny
Senior Member
Senior Member
Posts: 387
Joined: 2007-09-10, 13:19 UTC

File remained selected after overwrite

Post by *browny »

Windows 11 25H2, TC 11.56 64-bit
VBoxGuestAdditions.iso was selected in the left pane, in the right pane F5 was pressed on VBoxGuestAdditions.iso_842.
In the copy dialog the extension was truncated to .iso, then Ok and Overwrite were pressed.
Files were on different physical drives; same size but different contents.
The file in the left pane remained selected, though it was overwritten and now both have the same contents.

Usually after write operations file panes was updated and selections removed, so it was expected that selection on the left should be gone.
User avatar
AntonyD
Power Member
Power Member
Posts: 1745
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: File remained selected after overwrite

Post by *AntonyD »

It's repeatable - but only if you don't touch the mouse! And work only with keyboard!
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 51406
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: File remained selected after overwrite

Post by *ghisler(Author) »

This happens because nothing has changed in the target folder, so no refresh happens. This is intentional.
I cannot reproduce that the selection would go away when moving the mouse.
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 1745
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: File remained selected after overwrite

Post by *AntonyD »

because nothing has changed in the target folder
So the fact that a file with DIFFERENT content appeared in the directory is no longer enough?
#146217 personal license
JOUBE
Power Member
Power Member
Posts: 1719
Joined: 2004-07-08, 08:58 UTC

Re: File remained selected after overwrite

Post by *JOUBE »

AntonyD wrote: 2025-10-12, 16:06 UTC
because nothing has changed in the target folder
So the fact that a file with DIFFERENT content appeared in the directory is no longer enough?
Should every file content really be compared in its entirety before and after each copy process in every panel? That would be crazy.
User avatar
AntonyD
Power Member
Power Member
Posts: 1745
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: File remained selected after overwrite

Post by *AntonyD »

Heh)))
The question was not entirely straightforward! It's just that the author said so clearly that literally nothing had been changed
that it was impossible not to latch onto this word.

And so the main message of the phrase was that it was illogical to make such a special allocation of the case when the immutability of data on any of the TC panels is declared in an unconfirmed manner.
IF an action was performed to copy/move to THAT panel, and especially with overwriting, then it is not logical to keep any selection unchanged.
#146217 personal license
browny
Senior Member
Senior Member
Posts: 387
Joined: 2007-09-10, 13:19 UTC

Re: File remained selected after overwrite

Post by *browny »

Additional details.
Files VBoxGuestAdditions.iso (left pane) and VBoxGuestAdditions_dup.iso (right pane) have the same size (and, in this test, contents).
Both were selected.
The same procedure: from the right panel press F5, modify name to match, Overwrite.
Selection remained on the left, but was removed on the right.
It would be more logical to treat selections symmetrically and unselect files on the left in case of successful copy operation.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 51406
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: File remained selected after overwrite

Post by *ghisler(Author) »

The problem is that it's difficult to say whether something was copied to the current target panel or not - the user may have skipped files, changed the target path, or there could have been an error. Therefore TC re-reads the target panel in any case, but only updates the list (and removes the selection) when there was an actual change of any name, size, date/time, or attribute.
Author of Total Commander
https://www.ghisler.com
browny
Senior Member
Senior Member
Posts: 387
Joined: 2007-09-10, 13:19 UTC

Re: File remained selected after overwrite

Post by *browny »

Fot the target to appear unchanged, the file had to be copied, then file timestamp must be modified. Having to call SetFileTime with the target path at least once - means something did have changed.

Choosing remove vs keep selection in the target: when selection in the source side was cleared, then it might be preferable (as a slightly safer bet) to remove selection also in the target. This would confirm that copy operation has completed - even if there were errors.
Post Reply