Ticket #3375 (closed defect: fixed)

Opened 9 years ago

Last modified 3 years ago

Lower [hardlink]'s precedence

Reported by: mooffie Owned by: andrew_b
Priority: trivial Milestone: 4.8.27
Component: mc-config-ini Version: master
Keywords: Cc: onlyjob@…
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

On my system I noticed that sometimes files (pictures, vids) aren't colored according to their types:

http://tinypic.com/view.php?pic=30k9atw&s=8

...as seen here, some 'png' files and one 'flv' aren't colored. It turns out that these files have 2 or more links pointing to them (see the "nlink" column in the screenshot). I don't know why these files have 2 links. It happens to be an NTFS partition. Maybe it's not uncommon there to find such things.

Now, look at filehighlight.ini:

https://github.com/MidnightCommander/mc/blob/master/misc/filehighlight.ini

"[hardlink]" comes before "[graph]", which is why (I think) it gets precedence.

So I think we should move the [hardlink] section to the bottom of the file. Why? It demands too much cognitive effort of the user to have colors serve two different purposes (indicating either filesystem-type or application-type). Unless hardlinks are shown in *very* distinctive colors (something no default skin does), common users won't "get" them.

Change History

comment:1 Changed 9 years ago by mooffie

First,

I apologize for submitting this ticket twice (or thrice, or frice; gods only know how many times I reloaded that page...). I didn't notice the "Please DON'T create ticket again and again if you get error from nginx!!!" warning on the front page.

(BTW, I remember encountering network problems with this site long ago, so I wonder what era the "Currently" in "Currently we have come problems with our web server" refers to.)

Second,

My ticket (the one I submitted earlier) was marked as dup of #3234 ("filehighlight doesn't work for hardlinks"). It isn't: whether filehighlight for hardlinks works or not doesn't matter: I just want the [hardlink] section to be moved to the bottom in the INI file. (I assume that the order of the sections in that file is the one reflected in mc_fhl_get_color.)

comment:2 Changed 3 years ago by andrew_b

  • Owner set to andrew_b
  • Status changed from new to accepted
  • Milestone changed from Future Releases to 4.8.27

comment:3 Changed 3 years ago by andrew_b

  • Branch state changed from no branch to on review

Branch: 3375_hardlink_highlight
changeset:aa8033cae4d50555c1a851e1df1b5d67a7fe25fa

comment:4 Changed 3 years ago by andrew_b

  • Votes for changeset set to andrew_b
  • Branch state changed from on review to approved

comment:5 Changed 3 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from andrew_b to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

Merged to master: [1a1c6cc27817b9d37ce8e057e0d594184f635d73].

git log --pretty=oneline 83d496680..1a1c6cc27

comment:6 Changed 3 years ago by andrew_b

  • Status changed from testing to closed

comment:7 Changed 3 years ago by onlyjob

  • Cc onlyjob@… added

I always thought it was a useful feature - to highlight hardlinks differently...
Now, how can I see if file have any hardlinks or if I just deleted the last hardlink?

Perhaps coloring was inconsistent but I've got accustomed to this bug-o-feature over the years.

Would it be possible to visually mark hardlinked files somehow, so they'd stand out among ordinary files?

comment:8 Changed 3 years ago by zaytsev

Maybe it would make sense to mark those files with a special character, like * for the executable files? For example with + ? It think that this would be much better than an implicit inconsistent highlighting. What do you think? Care to create a ticket?

Note: See TracTickets for help on using tickets.