Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 272951 Details for
Bug 404511
Coreutils ls is wrong color for broken symlinks
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
fix ls color orphan
coreutils-ls-color-orphan.patch (text/plain), 1.46 KB, created by
idak
on 2007-11-29 15:00:38 UTC
(
hide
)
Description:
fix ls color orphan
Filename:
MIME Type:
Creator:
idak
Created:
2007-11-29 15:00:38 UTC
Size:
1.46 KB
patch
obsolete
>--- coreutils-6.9/src/ls.c 2007-11-29 23:14:20.000000000 +0900 >+++ coreutils-6.9.89.48-96961/src/ls.c 2007-11-25 22:23:31.000000000 +0900 >@@ -1176,7 +1165,7 @@ main (int argc, char **argv) > { > /* Avoid following symbolic links when possible. */ > if (is_colored (C_ORPHAN) >- || is_colored (C_EXEC) >+ || (is_colored (C_EXEC) && color_symlink_as_referent) > || (is_colored (C_MISSING) && format == long_format)) > check_symlink_color = true; > >@@ -2570,7 +2574,8 @@ gobble_file (char const *name, enum file > || ((print_inode || format_needs_type) > && (type == symbolic_link || type == unknown) > && (dereference == DEREF_ALWAYS >- || (command_line_arg && dereference != DEREF_NEVER))) >+ || (command_line_arg && dereference != DEREF_NEVER) >+ || color_symlink_as_referent || check_symlink_color)) > /* Command line dereferences are already taken care of by the above > assertion that the inode number is not yet known. */ > || (print_inode && inode == NOT_AN_INODE_NUMBER) >@@ -2695,6 +2720,12 @@ gobble_file (char const *name, enum file > free (linkname); > } > >+ /* When not distinguishing types of symlinks, pretend we know that >+ it is stat'able, so that it will be colored as a regular symlink, >+ and not as an orphan. */ >+ if (S_ISLNK (f->stat.st_mode) && !check_symlink_color) >+ f->linkok = true; >+ > if (S_ISLNK (f->stat.st_mode)) > f->filetype = symbolic_link; > else if (S_ISDIR (f->stat.st_mode))
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 404511
: 272951