Deleted opened file remains on files list

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
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Deleted opened file remains on files list

Post by *fenix_productions »

This bug might be related to other one posted here about partially locked files deleting (I can't find it at this moment).

Steps to reproduce:
1. put some DLL files into test directory
2. open one of these in FileAlyzer application,
3. select mentioned files and delete them,
4. confirm deleting files.

All files except opened one disappear from the list. To make this one vanish you have to close FileAlyzer.

TC should either warn about deleting such resource or remove it from list right away IMHO.

Notes:
Trying to remove this file second time gives "Please remove the write protection" dialogue. That should happen at first place.

Ths bug appears in 7.04a too.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
Hacker
Moderator
Moderator
Posts: 13102
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

I am not sure if I'd call it a bug, but I have observed similar behavior when trying to delete a video file which was still opened by BSPlayer. After closing BSPlayer (or the video file in BSPlayer) the file disappeared from the list (was deleted?) in TC. There was no error message before or after.
As I said, I do not find this behavior bad, per se.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2Hacker
It might be OK if you want to delete opened file when you are in the same directory but it's bad when you are on upper level.

In that case you have a warning that folder cannot be deleted. Closing app removes the file which was holding operation but empty folder remains on disk.

I just want some consistency here. Either warn for each scenario or delete folder too.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have observed this behaviour too, and it seems to be a Windows "misfeature": DeleteFile returns "success" in this case, although the file isn't really deleted until the program which has opened it closes the file. Only then the file is deleted by Windows. When you try to delete such a deleted file again, you will get an error. But the file is still listed by FindFirstFile...
Author of Total Commander
https://www.ghisler.com
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2ghisler(Author)
Thanks for explanation.

I assume it's "Behaviour which will not be changed" :)
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
Post Reply