Retry delete folder fails if running exe in it skipped but then closed

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Retry delete folder fails if running exe in it skipped but then closed

Post by *DrShark »

To reproduce:
1. Put executable in empty folder and launch it.
2. Try to delete the folder with Shift+Del:
a warning that directory is not empty will appear.
3. Press "Delete" in that "not empty!" warning:
"Please remove the write protection!" dialog will appear.
4. Press "Skip" in "Please remove the write protection!" dialog:
"The following files/folders could not be deleted" will appear.
5. Close application started in step 1.
6. Press "Retry" button in "The following files/folders could not be deleted" dialog:
folder will not be deleted, instead "The following files/folders could not be deleted" will be re-opened again.
User will have to press Cancel there which will skip deleting that folder to continue operation.

Expected behavior: in step 6 TC on "Retry" should again show "not empty!" warning dialog from step 2.
If in step 3 user pressed "All" in not empty warning instead of "Delete", in step 6 on pressing "Retry" it should try to delete folder without warnings.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
petermad
Power Member
Power Member
Posts: 14791
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Retry delete folder fails if running exe in it skipped but then closed

Post by *petermad »

I can confirm the behaviour.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48075
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Retry delete folder fails if running exe in it skipped but then closed

Post by *ghisler(Author) »

Sorry but this is by design: Once a file has been skipped, and TC tries to delete the folder containing that file, it will not return to delete files inside that folder. The user has skipped it, and it would be dangerous to return to it.
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: Retry delete folder fails if running exe in it skipped but then closed

Post by *DrShark »

ghisler(Author) wrote: 2020-02-02, 09:08 UTCThe user has skipped it, and it would be dangerous to return to it.
Sometimes it may be dangerous, but not in cases like one described in start post. To make it possible to continue delete in such cases, I suggest to add additional Yes/No or Yes/No/Cancel (or maybe one with custom choice buttons) warning using CAPSed keywords for attention which will appear after pressing "Retry" in "The following files/folders could not be deleted" dialog:

Code: Select all

---------------------------
[Permanently] delete
---------------------------
You're going to DELETE folder which contains files/folders SKIPPED before.
CONTINUE ANYWAY?
---------------------------
Yes   No   Cancel   
---------------------------
with "No" or "Cancel" set as default button. This solution will probably require additional translations, so may be it worth considering as a fix for for later TC version.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
petermad
Power Member
Power Member
Posts: 14791
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Retry delete folder fails if running exe in it skipped but then closed

Post by *petermad »

Sorry but this is by design
Then it is counterintuitive to have "Retry" as an option - since TC does NOT retry.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48075
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Retry delete folder fails if running exe in it skipped but then closed

Post by *ghisler(Author) »

It retries to delete the folder, not its contents. This can be useful when the folder was locked because it was the current directory of a running progra, and the user closed that program in the meantime. The user skipped deleting the running program, so why would he suddenly want to delete it now?
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: Retry delete folder fails if running exe in it skipped but then closed

Post by *DrShark »

ghisler(Author) wrote: 2020-02-04, 08:35 UTCThe user skipped deleting the running program, so why would he suddenly want to delete it now?
Because at the moment of skipping user may be still unaware of reason why TC showed access denied dialog with skip button (it may appear not only because the exe we're deleting is running, but because of missing NTFS rights etc.).

BTW, my above suggestion about warning dialog with caps isn't helpful if TC uses some Asian languages, so maybe important words should be also bold or underlined.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Post Reply