Incorrect confirmation dialog for Hidden+System files

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
umbra
Power Member
Power Member
Posts: 871
Joined: 2012-01-14, 20:41 UTC

Incorrect confirmation dialog for Hidden+System files

Post by *umbra »

Create any file and set its attributes to hidden+system. This issue does not seem to be happening with other attribute combinations, just with this one. Also, I tested it on Windows 8 x64. I don't know, if it applies to previous versions or not. TCx32 and TCx64 behave the same way.

Win95Delete
Set Win95Delete=1 (this makes VistaDelete irrelevant) and try to delete the file.

You will get a standard Explorer delete dialog and then, you should get a confirmation dialog mentioning, that the deleted file might be important. However the shown dialog just asks you again if you want delete the file (no special warning).
Image: http://i1057.photobucket.com/albums/t399/uumbra8/TC/bugs/tc-hidden-system-win95.png

VistaDelete
Set VistaDelete=1 (and don't forget to disable Win95Delete to make it work) and try to delete the file.

You will get a result very similar to the previous one. Except when you delete to the Recycle bin, you don't get just a similar "confirmation" dialog, but the exactly same dialog again. Shift-delete seems to use completely different dialogs (probably TC's internal).
Image: http://i1057.photobucket.com/albums/t399/uumbra8/TC/bugs/tc-hidden-system-vista.png

Internal delete
If you disable both VistaDelete and Win95Delete, TC uses its internal dialogs - no issue there.

Explorer
And, for comparison, here is how it looks in Explorer:
Image: http://i1057.photobucket.com/albums/t399/uumbra8/TC/bugs/explorer-hidden-system.png
Windows 7 Pro x64, Windows 10 Pro x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This option is currently not supported by VistaDelete. Why? It's not possible to skip files in this function. However, VistaDelete is only called when deleting to recycle bin, so the file isn't lost immediately.
Author of Total Commander
https://www.ghisler.com
umbra
Power Member
Power Member
Posts: 871
Joined: 2012-01-14, 20:41 UTC

Post by *umbra »

What option?
I'm talking about the text of confirmation dialogs. The text is incorrect if VistaDelete OR Win95Delete are enabled. The text is correct if and only if both settings are disabled. The difference between VistaDelete and Win95Delete is only in a design of confirmation dialogs. And it applies only to hidden+system files. If one deletes a file that is just system, the text in confirmation dialogs is always correct.
Windows 7 Pro x64, Windows 10 Pro x64
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

umbra,
If you're delete via Explorer, TC can't control confirmations. Win95Delete option enables deletion via Explorer, VistaDelete also calls Explorer delete method.

Shift+Delete is handled by TC internally always so it can use internal dialogs.
umbra
Power Member
Power Member
Posts: 871
Joined: 2012-01-14, 20:41 UTC

Post by *umbra »

2MVV
Not true. Maybe, you should read my posts again. Or should I try to explain it differently?
Windows 7 Pro x64, Windows 10 Pro x64
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

You're right, from your second post it is clear that you're talking about text.

It is interesting why Explorer displays another confirmation text... It seems that it treats file as Windows system file (and it doesn't in case when delete command is initiated by TC).
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

There is a workaround that could be done - clearing system attribute before deleting.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I think it is better to leave it as is than to check attributes before deleting of every file or scanning entire folders.
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

There is no need to check attributes - they could be simply cleared. But what if user breaks deleting process? This could lead to situation, where files haven't been deleted, but have cleared attributes. And this could potentially slow down deleting process a bit...
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

So we need to read every file's attributes before deletion anyway...
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

Well, yes, but FindFirstFile/FindFirstFileEx API functions always return file attributes, so we get the attributes with no additional cost.
umbra
Power Member
Power Member
Posts: 871
Joined: 2012-01-14, 20:41 UTC

Post by *umbra »

OK, but does anyone have any idea, why this is happening? I mean, why delete operations initiated by TC have wrong confirmation text and only for files, that are hidden and system at the same time.
Windows 7 Pro x64, Windows 10 Pro x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have checked it now - it is indeed a bug in Explorer! The bug only occurs when you don't show hidden files in Explorer. It seems that Windows 8 is unable to determine that it's a hidden or system file when hidden files aren't displayed in Explorer. When you enable them in Explorer, the TC will also show the right message...

In Explorer it's under Display - Options - Display - Hide protected system files (sorry, translated from a Swiss German Windows).
Author of Total Commander
https://www.ghisler.com
umbra
Power Member
Power Member
Posts: 871
Joined: 2012-01-14, 20:41 UTC

Post by *umbra »

2ghisler(Author)
You are right. But, just to be precise:

It's about showing system files in Explorer (menu "View->Options->View->Hide protected operating system files (Recommended)"). Visibility of hidden files (menu "View->Options->View->Show hidden files, folders and drives") is irrelevant.

Also, today I tested it on a fully updated Windows 7 x64 and the behavior is practically the same. The only difference is that Win7 shows only one configuration dialog instead of two (but with wrong text anyway). So it does not seem to be a new bug (unless it has been introduced in an update like IE10).
Windows 7 Pro x64, Windows 10 Pro x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, that's what I wrote:
In Explorer it's under Display - Options - Display - Hide protected system files
It's just translated from German, I didn't know the exact English labels.
Author of Total Commander
https://www.ghisler.com
Post Reply