diff options
author | Leah Neukirchen <leah@vuxu.org> | 2017-09-17 00:59:04 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2017-09-17 00:59:04 +0200 |
commit | 1fea688aa22c88d9a11aabcce8cfafce3b100946 (patch) | |
tree | 1aa221a72c0b964422ef720f2113e645ce9ffae8 | |
parent | 4b154cdfc9ea0e656ab1e003d7da398050f954a7 (diff) | |
download | lr-1fea688aa22c88d9a11aabcce8cfafce3b100946.tar.gz lr-1fea688aa22c88d9a11aabcce8cfafce3b100946.tar.xz lr-1fea688aa22c88d9a11aabcce8cfafce3b100946.zip |
recurse: lstat on symlink loops, don't fail
-rw-r--r-- | lr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lr.c b/lr.c index 052bc29..2e9ad47 100644 --- a/lr.c +++ b/lr.c @@ -1868,7 +1868,8 @@ recurse(char *path, struct history *h) int root = (path[0] == '/' && path[1] == 0); if (resolve ? stat(fpath, &st) : lstat(fpath, &st) < 0) { - if (resolve && errno == ENOENT && !lstat(fpath, &st)) { + if (resolve && (errno == ENOENT || errno == ELOOP) && + !lstat(fpath, &st)) { /* ignore */ } else if (!h) { /* warn for toplevel arguments */ |