pb2 delete empty dir reports dir not empty

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
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

pb2 delete empty dir reports dir not empty

Post by *sgp »

winxp pro sp2 tc7pb2
create empty dir then open CMD.exe IN IT
delete empty dir from TC => "dir is not empty" (bug: it is), press "delete"
"could not delete dir" (OK because CMD is in it)

close CMD.EXE, repeat procedure, only the second prompt is displayed (correct).
User avatar
petermad
Power Member
Power Member
Posts: 14796
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Confirmed!
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
Valentino
Power Member
Power Member
Posts: 706
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine

Post by *Valentino »

When I close cmd.exe the dir is deleted without any warnings...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This is unfortunately normal windows behaviour. You get the same error as if the dir isn't empty.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2ghisler(Author)
This is unfortunately normal windows behaviour. You get the same error as if the dir isn't empty.
My suggestion: Check if the directory contains any files before trying to remove it. If yes ask user if it should be deleted even if it's not empty.
If even enumeration fails inform the user that the access is denied. This way to different error messages can be shown.
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

Lefteous wrote:My suggestion: Check if the directory contains any files before trying to remove it. If yes ask user if it should be deleted even if it's not empty.
If even enumeration fails inform the user that the access is denied. This way to different error messages can be shown.
Support++
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
Post Reply