1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-30 12:37:49 +00:00

Merge pull request #1094 from gbutler69/master

Added a check to see if the input file/path that ls is run on when us…
This commit is contained in:
Nathan Ross 2017-11-14 17:52:14 -05:00 committed by GitHub
commit 40fb0109a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -160,7 +160,7 @@ fn list(options: getopts::Matches) {
dir = true; dir = true;
if options.opt_present("l") && !(options.opt_present("L")) { if options.opt_present("l") && !(options.opt_present("L")) {
if let Ok(md) = p.symlink_metadata() { if let Ok(md) = p.symlink_metadata() {
if md.file_type().is_symlink() { if md.file_type().is_symlink() && !p.ends_with( "/" ) {
dir = false; dir = false;
} }
} }