mirror of
https://github.com/jarun/nnn.git
synced 2024-11-20 01:49:14 +00:00
List symlink with target missing
This commit is contained in:
parent
0cf77c2ac6
commit
5ea8dee428
14
src/nnn.c
14
src/nnn.c
|
@ -3004,8 +3004,18 @@ static int dentfill(char *path, struct entry **dents)
|
|||
}
|
||||
|
||||
if (fstatat(fd, namep, &sb, flags) == -1) {
|
||||
DPRINTF_S(namep);
|
||||
continue;
|
||||
/* List a symlink with target missing */
|
||||
if (!flags && errno == ENOENT) {
|
||||
if (fstatat(fd, namep, &sb, AT_SYMLINK_NOFOLLOW) == -1) {
|
||||
DPRINTF_S(namep);
|
||||
DPRINTF_S(strerror(errno));
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
DPRINTF_S(namep);
|
||||
DPRINTF_S(strerror(errno));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (n == total_dents) {
|
||||
|
|
Loading…
Reference in a new issue