Ticket #2478: mc-hardlinkcolor.patch

File mc-hardlinkcolor.patch, 1.1 KB (added by curtis, 14 years ago)

fix attached - although I'm not a programmer, so it may not be the wisest way to fix

  • lib/filehighlight/get-color.c

    diff --git a/lib/filehighlight/get-color.c b/lib/filehighlight/get-color.c
    index 547e3fd..60578e2 100644
    a b mc_fhl_is_link (file_entry * fe) 
    8181} 
    8282 
    8383inline static gboolean 
     84mc_fhl_is_hlink (file_entry * fe) 
     85{ 
     86    return (fe->st.st_nlink >1); 
     87} 
     88 
     89inline static gboolean 
    8490mc_fhl_is_link_to_dir (file_entry * fe) 
    8591{ 
    8692    return mc_fhl_is_link (fe) && (fe->f.link_to_dir); 
    mc_fhl_get_color_filetype (mc_fhl_filter_t * mc_filter, mc_fhl_t * fhl, file_ent 
    175181            my_color = TRUE; 
    176182        break; 
    177183    case MC_FLHGH_FTYPE_T_LINK: 
    178         if (mc_fhl_is_link (fe)) 
     184        if ((mc_fhl_is_link (fe)) || (mc_fhl_is_hlink (fe))) 
    179185            my_color = TRUE; 
    180186        break; 
    181187    case MC_FLHGH_FTYPE_T_HARDLINK: 
    182         /*TODO: hanlde it */ 
    183         if (mc_fhl_is_link (fe)) 
     188        if (mc_fhl_is_hlink (fe)) 
    184189            my_color = TRUE; 
    185190        break; 
    186191    case MC_FLHGH_FTYPE_T_SYMLINK: 
    187         /*TODO: hanlde it */ 
    188192        if (mc_fhl_is_link (fe)) 
    189193            my_color = TRUE; 
    190194        break;