TC7.03 No confirmation before overwriting hidden/system file

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

User avatar
white
Power Member
Power Member
Posts: 4677
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

TC7.03 No confirmation before overwriting hidden/system file

Post by *white »

In Configuration/Misc I checked all confirmation options.

Code: Select all

Get Confirmation before
v Deleting non-empty directories
v Overwriting files
v Overwriting/Deleting read-only files
v Overwriting/Deleting hidden/system files
v Drag&Drop (copying files with the mouse)
In a directory I created 7 identical files containing the text "This is a test". I changed the attributes of the files as shown below.

Code: Select all

name   attributes
1.txt  -a--
2.txt  ra--
3.txt  -ah-
4.txt  -a-s
5.txt  rah-
6.txt  ra-s
7.txt  rahs
I copied all 7 files to a destination folder.
Then, I again copied to the same files to the same destination folder and always clicked the Overwrite button in the overwrite dialogs.
The following overwrite dialogs were displayed:
  1. "Overwrite dialog box"
  2. "Overwrite dialog box" and the "The file is READ ONLY dialog box"
  3. "Overwrite dialog box"
  4. "Overwrite dialog box"
  5. "Overwrite dialog box" and the "The file has the HIDDEN or SYSTEM attribute dialog box"
  6. "Overwrite dialog box" and the "The file has the HIDDEN or SYSTEM attribute dialog box"
  7. "Overwrite dialog box" and the "The file has the HIDDEN or SYSTEM attribute dialog box"
Conclusion: If the file is not Read Only no confirmation is asked before overwriting hidden or system files.
(Works like this at least since version 6.54)
User avatar
petermad
Power Member
Power Member
Posts: 14914
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Maybe it is a feature?

If you click the "Overwrite all" button you will be asked for files with only hidden and/or system attribute (without readonly attribute).

If you mark all the source files as only archive you will also be asked for confirmation for hidden and/or system files even if you click the "Overwrite" button for each file in stead of the "Overwrite all" button.

I don't really see the idea of doing it differently though, just because the source and the target files has the same attributes when you choose the "Overwrite" button.
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
white
Power Member
Power Member
Posts: 4677
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

petermad wrote: If you click the "Overwrite all" button you will be asked for files with only hidden and/or system attribute (without readonly attribute).
Confirmed.
petermad wrote:If you mark all the source files as only archive you will also be asked for confirmation for hidden and/or system files even if you click the "Overwrite" button for each file in stead of the "Overwrite all" button.
Not confirmed!
petermad wrote:I don't really see the idea of doing it differently though, just because the source and the target files has the same attributes when you choose the "Overwrite" button.
There is no difference on my computer.
User avatar
petermad
Power Member
Power Member
Posts: 14914
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

If you mark all the source files as only archive you will also be asked for confirmation for hidden and/or system files even if you click the "Overwrite" button for each file in stead of the "Overwrite all" button.
Not confirmed!
I have just rechecked it - that's how it behaves here - I've checked on both FAT and NTFS partions.

Anyway - I don't think the behaviour you described is what yhe user expects, and I think it should be changed.
Last edited by petermad on 2008-05-02, 08:12 UTC, edited 1 time in total.
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: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

OK, it's a bit difficult to explain why it works like this, but it has good reasons: The idea is to give additional protection to system files which have the read only plus hidden or system attribute. It's meant for the situation where you copy a lot of files. Sooner or later you may encounter a file which is read only. You decide to overwrite all read only files - so far so good. Now there comes an important system file like ntldr or NTDETECT.COM. These files have hidden/system set in addition to read only. Therefore TC now asks whether you want to overwrite the file. The hidden/system attributes are unfortunately abused for many not so important files, so TC does not ask extra when overwriting them, like descript.ion files or *.gid files (help system). To conclude, the hidden/system file check is made only when the overwriting of the target file fails.

When deleting, the restriction is more severe: Here you will be asked about hidden/system files in any case.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14914
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2ghisler(Author)

But when you mark:

v "Overwriting/Deleting hidden/system files"

in the configuration -> Misc. dialog you should expect to be asked when overwriting system/hidden files until you answer "All".

And it doesn't explain why you are asked when you are about to overwrite a system file with a non-system file, but not when overwriting it with a system file.
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
white
Power Member
Power Member
Posts: 4677
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

petermad wrote:If you mark all the source files as only archive you will also be asked for confirmation for hidden and/or system files even if you click the "Overwrite" button for each file in stead of the "Overwrite all" button.
I have done it like in these screenshots:

Screenshot test 1: Source files have same attributes as destination files
Screenshot test 2: All source files only have archive attribute

Is this what you meant?

(Sorry about the dutch language)
User avatar
petermad
Power Member
Power Member
Posts: 14914
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2white

Yes exactly like screenshot test 2. I thereafter mark all the files on the left side, press F5 and only press the "Overwrite" button. For all files except 1.txt I am asked a second time to overwrite EITHER because of readonly OR because of system/hidden.

I have also included a file 8.txt with -ahs atribute - you are missing that combination.
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
white
Power Member
Power Member
Posts: 4677
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

ghisler(Author) wrote:OK, it's a bit difficult to explain why it works like this, but it has good reasons: The idea is to give additional protection to system files which have the read only plus hidden or system attribute. It's meant for the situation where you copy a lot of files. Sooner or later you may encounter a file which is read only. You decide to overwrite all read only files - so far so good. Now there comes an important system file like ntldr or NTDETECT.COM. These files have hidden/system set in addition to read only. Therefore TC now asks whether you want to overwrite the file. The hidden/system attributes are unfortunately abused for many not so important files, so TC does not ask extra when overwriting them, like descript.ion files or *.gid files (help system). To conclude, the hidden/system file check is made only when the overwriting of the target file fails.

When deleting, the restriction is more severe: Here you will be asked about hidden/system files in any case.
Do you think any TC user understands? Especially when the dialogs and help text say otherwise?

Since this is not intuitive at all, it should be well described and documented. Better yet, redesign the thing to be more intuitive.

BTW. How come a system file is only important when it is read only or when it is deleted instead of overwritten?
User avatar
petermad
Power Member
Power Member
Posts: 14914
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

I have made a little more testing of overwriting hidden and system files. In all cases below the "Overwrite" button is pressed first.

Code: Select all

source   target   extra confirmation
  h         h             no
  s         s             no
  hs        hs            no
  s         h             yes
  h         s             yes
  hs        h             no
  hs        s             no
  h         hs            yes
  s         hs            yes
The pattern is not fully logical to me. The rule seems to be that if the target file has an attribute that is not present for the source file then TC asks for confirmation.

If I add readonly to those target files above that do not require an extra overwriting confirmation - then I am asked an extra time, but given the reason that the files are system/hidden - which obviously is not correct - it is because they are readonly that I am asked the second time - otherwise I would also had been asked before the files had been marked with the readonly attribute.
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
white
Power Member
Power Member
Posts: 4677
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

petermad wrote: Yes exactly like screenshot test 2. I thereafter mark all the files on the left side, press F5 and only press the "Overwrite" button. For all files except 1.txt I am asked a second time to overwrite EITHER because of readonly OR because of system/hidden.
Checked it again and again. It does not do this on my computer (Win 98 SE).

BTW. When I do a move instead of a copy... confirmation before overwriting system files does no longer depend on the destination file being Read Only.
User avatar
petermad
Power Member
Power Member
Posts: 14914
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2white

Have you tried this scenario:

http://madsenworld.dk/tcmd/hs.png

copying left to right?

Don't you get what I've described two posts above?
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
white
Power Member
Power Member
Posts: 4677
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

petermad wrote:2white

Have you tried this scenario:

http://madsenworld.dk/tcmd/hs.png

copying left to right?

Don't you get what I've described two posts above?
Nope. I don't get any extra confirmation.

Code: Select all

source   target   extra confirmation
  h         h             no
  s         s             no
  hs        hs            no
  s         h             no
  h         s             no
  hs        h             no
  hs        s             no
  h         hs            no
  s         hs            no
User avatar
petermad
Power Member
Power Member
Posts: 14914
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2white

Have you checked your Configuration -> Misc. settings lately?
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
white
Power Member
Power Member
Posts: 4677
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

petermad wrote:2white

Have you checked your Configuration -> Misc. settings lately?
All the time. All options checked:

Code: Select all

Get Confirmation before
v Deleting non-empty directories
v Overwriting files
v Overwriting/Deleting read-only files
v Overwriting/Deleting hidden/system files
v Drag&Drop (copying files with the mouse) 
Post Reply