TC doesn't delete if Esc was pressed when counting

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

TC doesn't delete if Esc was pressed when counting

Post by *MVV »

1. Select a lot of files (e.g. 1k-2k).
2. Press Delete (explorer method should be used which is default in Win7).
3. Press Esc during counting files, TC doesn't react on it at all.
4. Windows asks for delete confirmation, answer Yes.
5. Nothing happens. However, all works fine w/o pressing Esc at step 3.

Checked with TC8x32RC2 @ Win7x64ProSP1.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50533
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Cannot reproduce - when Explorer method is used, TC doesn't count files in subdirs.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I don't know what TC does but it does something for a few seconds. All files are in a single folder.
umbra
Power Member
Power Member
Posts: 876
Joined: 2012-01-14, 20:41 UTC

Post by *umbra »

Confirmed. When you select a few thousands of files and press DEL, an empty "Deleting:" dialog appears. Then it waits for a while (CPU spikes and TC allocates 3.5kiB per file). After some time (depends on a number of files) a standard Windows delete dialog is shown. And as MVV reported, if you press ESC before the standard dialog appears, nothing gets deleted, regardless of what button you click in the dialog.
Windows 10 Pro x64, Windows 11 Pro x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50533
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I see - TC is creating the OLE2 interfaces and adds the files for deletion by Windows, which can take a while. TC doesn't count files here. Therefore when you press ESC, TC isn't in the counting phase, and aborts the delete operation.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Well, in such case it should abort it before Windows confirmation, or ignore Escape if user clicks Yes in it.
umbra
Power Member
Power Member
Posts: 876
Joined: 2012-01-14, 20:41 UTC

Post by *umbra »

Partially (mostly) fixed. ESC now reacts also during the creation of OLE objects. However, there is still a small time window (maybe a half of second) just before the windows delete dialog is shown, where the reported error still occurs.
Windows 10 Pro x64, Windows 11 Pro x64
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

umbra, you're right, it is hard to catch that moment (I tried 5-10 times) but it really exists, strange behaviour.

But anyway it works better. :)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50533
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

What you describe here is the time from when I pass the list of files to the delete function until the actual deletion starts, and TC gets callbacks from the function for each deleted file. There is no way to abort the function while it is in this preparation phase, sorry.

Moving thread to "will not be changed" forum.
Author of Total Commander
https://www.ghisler.com
Post Reply