Ticket #3234 (new defect)

Opened 7 years ago

Last modified 4 months ago

filehighlight doesn't work for hardlinks

Reported by: mc_user Owned by:
Priority: major Milestone: Future Releases
Component: mc-core Version: 4.8.12
Keywords: Cc: devel.openSUSE.org@…, aros@…
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description (last modified by andrew_b) (diff)

The support of hardlinks highlightning was added to mc's filehighlight according to changes log, but it doesn't work as expected.

Steps to reproduce:

  1. create a hardlink for file;
  2. ensure that skin <skin_name>.ini file contains:
        [filehighlight]
        hardlink = red;white
    
    and filehighlight.ini:
        [hardlink]
        type=HARDLINK
    
  3. look at a hardlink in a panel

Actual result:

  • no hardlink hightlight

Expected result:

  • working hightlightning for hardlinks

Change History

comment:1 Changed 7 years ago by mc_user

  • Cc devel.openSUSE.org@… added

comment:2 Changed 7 years ago by andrew_b

Ticket #3370 has been marked as a duplicate of this ticket.

comment:3 Changed 7 years ago by egmont

I never understood the concept of highlighting hardlinks.

It's an orthogonal property to the file type which is also highlighted. Which one should take precedence (see #3375) and why?

Just because there's a hardlink to a photo, why should it be highlighted differently from the other photos? Or just because the hardlinked file happens to be a photo, why should it be highlighted differently than the other hardlinked files? Obviously you can't have both.

Even the concept of having type=FILE_EXE, type=DEVICE, type=SYMLINK and then type=HARDLINK is conceptually wrong, again hardlink is orhtogonal to the others. Yes, you can have a hardlink on a device or on a symlink.

If mc can highlight on this property, why can't (or if can then why doesn't) it highlight on properties such as unusual dangerous permissions (writable by others), unexpected owner (different from containing directory), timestamps in the future, etc.?

Seriously, I'm wondering, what's the use case why you would want to highlight hard links? If I work with files (e.g. watch a movie), I care about the file types and highlighting movies with a certain color helps, but telling me that the file is accessible under multiple names doesn't help at all.

In the rare case when I'm interested in hard links, I can add this column to file listing, just as I can add more important properties like owner/group and permissions that are not shown by default either.

comment:4 Changed 5 months ago by andrew_b

Ticket #4237 has been marked as a duplicate of this ticket.

comment:5 follow-up: ↓ 7 Changed 5 months ago by birdie

  • Cc aros@… added

Commenting out the hardlink section in /etc/mc/filehighlight.ini fixes the issue.

#[hardlink]
#    type=HARDLINK
Last edited 4 months ago by andrew_b (previous) (diff)

comment:6 Changed 5 months ago by andrew_b

  • Description modified (diff)

comment:7 in reply to: ↑ 5 Changed 4 months ago by andrew_b

Replying to birdie:

Commenting out the hardlink section in /etc/mc/filehighlight.ini

JFYI: you can use ~/.config/mc/filehighlight.ini instead of modifying system-wide config file.

fixes the issue.

#[hardlink]
#    type=HARDLINK

This is fixed in #3375.

Note: See TracTickets for help on using tickets.