(gobble_file): Fall back on using lstat when required:
authorJim Meyering <jim@meyering.net>
Wed, 15 Jan 2003 11:59:07 +0000 (11:59 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 15 Jan 2003 11:59:07 +0000 (11:59 +0000)
commit800f3a1e77d6185038d3d553b4188ea138a08881
treec0d6d6bddd8fb3478da2c1273814d27eec43c346
parentb1ebf2a3838cb7c673a641884fd4a64833d99258
(gobble_file): Fall back on using lstat when required:
when --dereference (-L) is not specified, and
- when operating on a dangling symlink
- when operating on command-line-symlink-to-directories
This fixes numerous problems.  Here are examples:
- `ls dangling-symlink' would fail with `no such file...'
Now it prints `dangling-symlink'.
- `ls -i symlink' would mistakenly print the inode of the referent.
Now it prints the inode of the symlink.  Likewise for --size (-s).
Based on a patch from Michael Stone.
Reported by Deepak Goel as Debian bug #173793.
src/ls.c