solved [TC 9.20 and newer] changing the "a" attribute is not always shown in the file panel

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

solved [TC 9.20 and newer] changing the "a" attribute is not always shown in the file panel

Post by *petermad »

I have encountered that sometimes when changing the "a" attribute for multiple files via the "Change attributes" dialog, the change is not shown in the file panel ("Auto-refresh" -> "Also when size, date or attribute change" is enabled)

It seems to both depend on the file names, but also the time stamp for the files in question. I can only reproduce it on NTFS partitions, not on FAT partitions with lower time stamp resolution.

I have put two test files here: https://tcmd.madsenworld.dk/attributetest.zip

Inside the attributetest.zip file is a test.7Z - unpack the test.7Z to a NTFS formatted drive. (the reason while I have packed the .7z file in a zip file, is that my Web-hotel provider deletes .7z and .rar files :shock: and the reason for using a .7z file is that zip files don't preserve the high-resolution time stamp)

Mark the two files wcmd_win7amd64_1_eng.ini and wcmd_win7amd64_1_eng.mnu - then open the "Change attributes" dialog and make the "a" box blank in order to remove the archive attributes. After pressing OK the attributes are unaltered in the file panel, you either have to go out and in to the current dir or use cm_RereadSource 3 to have the attribute settings for the two files updated in the file panel.

The same thing happen if I try to set the "a" timestamp again.

If I change the time stamp of one of the two files, I can no longer reproduce the bug.

I can change the file names to for example wcmd_win8amd64_1_eng.ini and wcmd_win8amd64_1_eng.mnu and still reproduce the bug, but if I change the names to wcmd_win5amd64_1_eng.ini and wcmd_win5amd64_1_eng.mnu or if I delete characters in the names, then I can no longer reproduce it.

The bug only occurs if I change the attribute for both files at the same time, not if I change one file at the time.
The bug does not occur when changing the "r", "h", and "s" timestamp - at least not for these two files.
The bug does not occur if I choose more files than these two.

I guess that TC uses some sort of hash to check if the file attributes have been changed and this hash for some reason is the same for these two files whether the a-attribute is set or not. But maybe TC should always update the file list when using "Change attributes" dialog, since there in most cases will be changes to update.
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: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 9.20 and newer] changing the "a" attribute is not always shown in the file panel

Post by *ghisler(Author) »

Not confirmed. I followed your steps, but the change appears immediately.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 9.20 and newer] changing the "a" attribute is not always shown in the file panel

Post by *white »

Confirmed with TC 32-bit and 64-bit.
Same problem if I rename *.mnu to *.mn

Tested with clean ini under Windows 11 Pro, 23H2, build 22631.2792.
Files unpacked to folder c:\TEST\petermad\
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 9.20 and newer] changing the "a" attribute is not always shown in the file panel

Post by *petermad »

2ghisler(Author)
I have now tested it further and it seems to be OS-dependent
Under Windows 7 the behavior is as described.
Under Windows XP and 8.1 it is only the wcmd_win8amd64_1_eng.ini that does not get its attribute updated.
Under Windows 10 22H2 I cannot reproduce the problem.

I thought it could be of inportance where the caret is placed, but that does not seem to matter.
Under Windows XP and 8.1 it sometimes worked as it should after a couple of tests, but if I test with a freshly started TC (not just restarted with cm_Exit 9), the bug is fully reproducible.

WatchDirs=55 has to be set to reproduce the problem. With that setting I can reproduce it with an otherwise clean ini 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: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 9.20 and newer] changing the "a" attribute is not always shown in the file panel

Post by *white »

On my machine the issue occurs since TC 8.51 beta 4. Perhaps this change has something to do with it:
history.txt wrote:14.03.14 Fixed: Folder size (loaded via Alt+Shift+Enter) lost after switching to other program and back when sorting folders by size. Solution: Make folder checksum independent from sort order (32/64)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 9.20 and newer] changing the "a" attribute is not always shown in the file panel

Post by *ghisler(Author) »

Not happening on Windows 11, so probably like Windows 10.
I will test it on Windows 7 later.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 9.20 and newer] changing the "a" attribute is not always shown in the file panel

Post by *white »

ghisler(Author) wrote: 2023-12-11, 16:33 UTC Not happening on Windows 11
It is for me. And consistently. And regardless of refresh settings.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 9.20 and newer] changing the "a" attribute is not always shown in the file panel

Post by *ghisler(Author) »

I now tried on Windows 7, and it's not happening there either. Maybe it doesn't happen when using the built-in 7zip unpacker to extract the sample files?

Edit: It happens after unpacking the archive with 7zg.exe on the command line.

The reason is the following: TC uses a checksum to detect whether something in a directory has changed, so it can leave the list unchanged when nothing has changed. This checksum is calculated for each item separately and then combined with XOR (exclusive or). This is done so the sort order doesn't matter. Now when changing 2 files at the same time, it can cause the 2 changes to cancel each other out. The solution will be to recalculate the checksum every time the list is sorted too, and use a checksum over all items (order-dependent).
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 9.20 and newer] changing the "a" attribute is not always shown in the file panel

Post by *ghisler(Author) »

This should be fixed in Total Commander 11.03 RC1, please check it!
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 9.20 and newer] changing the "a" attribute is not always shown in the file panel

Post by *white »

Tested OK using TC 11.03rc1 32-bit and 64-bit.
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 9.20 and newer] changing the "a" attribute is not always shown in the file panel

Post by *petermad »

Confirmed fixed in TC 11.03rc1 :-)

I dont seee any entry in history.txt for the fix though.
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
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: solved [TC 9.20 and newer] changing the "a" attribute is not always shown in the file panel

Post by *petermad »

Moderator message from: petermad » 2024-01-19, 18:57 UTC

Moved to "TC fixed bugs" from "TC11.x bug reports (English)"
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
Post Reply