strange (?) file coloring in "show hidden files" mode

English support forum

Moderators: white, Hacker, petermad, Stefan2

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

Re: strange (?) file coloring in "show hidden files" mode

Post by *petermad »

2KozakMak

Try from the root to first set hs for the Source folder, and then remove hs again - does it still show hs when you go into the folder?
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:

Re: strange (?) file coloring in "show hidden files" mode

Post by *ghisler(Author) »

I have tested in the debugger what is going on:
1. The ".." entries really have set these hidden or system attributes shown when cm_switchHidSys is on
2. When cm_switchHidSys is off, TC filters out all files and folders which have these attributes set, including ".."
3. When ".." is filtered out, TC adds its own ".." entry with the attributes and date taken from the folder itself

My suggested changes would be:
1. Do not filter out ".." when cm_switchHidSys is off to get the date/time of the ".." entry
2. Reset the attribite field of ".." either to just "directory", or "directory"+"read only" but ignore hidden and system.
This could be done either when cm_switchHidSys is off, or also when it's on.

What do you think?
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 1256
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: strange (?) file coloring in "show hidden files" mode

Post by *AntonyD »

1. Do not filter out ".."
of course.
#146217 personal license
KozakMak
Senior Member
Senior Member
Posts: 380
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: strange (?) file coloring in "show hidden files" mode

Post by *KozakMak »

ghisler(Author) wrote: 2023-11-19, 08:53 UTC 1. Do not filter out ".."
of course. (с)
OS: Win10 | TC: latest x64
User avatar
white
Power Member
Power Member
Posts: 4677
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: strange (?) file coloring in "show hidden files" mode

Post by *white »

ghisler(Author) wrote: 2023-11-19, 08:53 UTC 1. The ".." entries really have set these hidden or system attributes shown when cm_switchHidSys is on
Indeed, when executing the dir command in a Command Prompt window, the ".." is not shown unless you instruct dir to also show hidden files.
The attributes seem to be the same as what GetFileAttributes returns for the root folder of NTFS drives. See here.

ghisler(Author) wrote: 2023-11-19, 08:53 UTC My suggested changes would be:
1. Do not filter out ".." when cm_switchHidSys is off to get the date/time of the ".." entry
Agreed.
ghisler(Author) wrote: 2023-11-19, 08:53 UTC 2. Reset the attribite field of ".." either to just "directory", or "directory"+"read only" but ignore hidden and system.
This could be done either when cm_switchHidSys is off, or also when it's on.
When cm_switchHidSys is turned on (show hidden and system files), the hs attributes could be shown (like it is now). It can be useful to show that the parent folder has hidden/system attributes.

When cm_switchHidSys is turned off (don't show hidden and system files) and the ".." entry has hidden and/or system attributes, Total Commander is showing the ".." entry anyway for navigation purposes. In this case showing the hs attributes is confusing. I don't like the idea of showing a fake r attribute. Would it be possible to show an asterisk symbol (*) instead of h and s?
User avatar
Gral
Power Member
Power Member
Posts: 1474
Joined: 2005-01-26, 15:12 UTC

Re: strange (?) file coloring in "show hidden files" mode

Post by *Gral »

white wrote: 2023-11-19, 12:43 UTC ...Would it be possible to show an asterisk symbol (*) instead of h and s?
This will cause a lot of questions "why does TC show an asterisk instead of attributes?"
User avatar
white
Power Member
Power Member
Posts: 4677
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: strange (?) file coloring in "show hidden files" mode

Post by *white »

Gral wrote: 2023-11-19, 13:02 UTC This will cause a lot of questions "why does TC show an asterisk instead of attributes?"
Which could be explained in Help - File window.
Perhaps the user should be able to choose from several options dealing with this situation. For example to show h and s, don't show h and s or show asterisks instead.

Do you have a better idea?
User avatar
petermad
Power Member
Power Member
Posts: 14914
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: strange (?) file coloring in "show hidden files" mode

Post by *petermad »

I would like to test this, but i cannot find a folder on my systems where the attributes for [..] when going into the folder are different from the attributes of the folder. Is there some way to create such a folder?
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

Re: strange (?) file coloring in "show hidden files" mode

Post by *white »

petermad wrote: 2023-11-19, 18:03 UTC I would like to test this, but i cannot find a folder on my systems where the attributes for [..] when going into the folder are different from the attributes of the folder.
What do you mean by "folder"? The parent folder (the attributes of the parent folder are shown when cm_switchHidSys is on) or the current folder (the attributes of the current folder are shown when cm_switchHidSys is off)?
User avatar
Gral
Power Member
Power Member
Posts: 1474
Joined: 2005-01-26, 15:12 UTC

Re: strange (?) file coloring in "show hidden files" mode

Post by *Gral »

2 white
Look at KozakMak's images
https://ibb.co/94gBfYf
https://ibb.co/ncxGQfr
Properties of ".." in "Program Files" and "Program Files" on root are different.
User avatar
Gral
Power Member
Power Member
Posts: 1474
Joined: 2005-01-26, 15:12 UTC

Re: strange (?) file coloring in "show hidden files" mode

Post by *Gral »

petermad wrote: 2023-11-19, 18:03 UTC I would like to test this, but i cannot find a folder on my systems where the attributes for [..] when going into the folder are different from the attributes of the folder. Is there some way to create such a folder?
Same here. It is easy to create such a folder on FAT volumes - just create folder and set different attributes on "Change attributes" window - ".." does not get this new properties. But after copy to NTFS volume all ".." properties are set to this visible in parent.
User avatar
white
Power Member
Power Member
Posts: 4677
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: strange (?) file coloring in "show hidden files" mode

Post by *white »

Gral wrote: 2023-11-19, 18:21 UTC Look at KozakMak's images
https://ibb.co/94gBfYf
https://ibb.co/ncxGQfr
Properties of ".." in "Program Files" and "Program Files" on root are different.
So? That is exactly how I described it. When cm_switchHidSys is on (as it is on the screenshots) the attributes of ".." are the same as the parent folder, in this case the root folder. Which is the same when you execute dir /a in a Command Prompt window.

When cm_switchHidSys is off, TC shows the attributes of the folder itself (so basically "." (single dot)), which is about to be changed.
User avatar
Gral
Power Member
Power Member
Posts: 1474
Joined: 2005-01-26, 15:12 UTC

Re: strange (?) file coloring in "show hidden files" mode

Post by *Gral »

Your post wasn't a description, it was a question - note question marks!
So i answered you.
User avatar
petermad
Power Member
Power Member
Posts: 14914
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: strange (?) file coloring in "show hidden files" mode

Post by *petermad »

just create folder and set different attributes on "Change attributes" window - ".." does not get this new properties. But after copy to NTFS volume all ".." properties are set to this visible in parent.
Yes, I see that, but how to create a folder that has no attributes when you are in the folder where you can see its name, but has the attributes hs on the [..] entry, when you go into the folder. as seen on KozakMak's images.
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: 14914
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: strange (?) file coloring in "show hidden files" mode

Post by *petermad »

So? That is exactly how I described it. When cm_switchHidSys is on (as it is on the screenshots) the attributes of ".." are the same as the parent folder, in this case the root folder. Which is the same when you execute dir /a in a Command Prompt window.
That is not what I see, here the attributes are always the same on [..] as it is on the folder if I go updir - on NFTS and exFAT drives. On FAT drives. the attrubutes for [..] are always blank.

The setting of cm_switchHidSys does not alter that, but if cm_switchHidSys is off and I go updir from inside a dir where the attributes for [..] is shown as hs - I can of course not see the dir until I turn cm_switchHidSys on again.
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