about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2022-09-10 23:19:36 +0200
committerLeah Neukirchen <leah@vuxu.org>2022-09-10 23:19:36 +0200
commit3be410703d4aa3a2c42f4b8b806fd769b18d0b61 (patch)
tree074530b155c2b7ce6cf1e26a13b09b23a8705939
parent01ceb9c89ddeffbb45f14b68a26b45734f7cf5b2 (diff)
downloadlr-3be410703d4aa3a2c42f4b8b806fd769b18d0b61.tar.gz
lr-3be410703d4aa3a2c42f4b8b806fd769b18d0b61.tar.xz
lr-3be410703d4aa3a2c42f4b8b806fd769b18d0b61.zip
recurse: fix error detection
-rw-r--r--lr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lr.c b/lr.c
index 95cc098..da57ba7 100644
--- a/lr.c
+++ b/lr.c
@@ -2267,7 +2267,7 @@ recurse(char *path, struct history *h, int guessdir)
 	if (need_stat)
 		guessdir = 1;
 
-	if (guessdir && (resolve ? stat(fpath, &st) : lstat(fpath, &st) < 0)) {
+	if (guessdir && (resolve ? stat(fpath, &st) : lstat(fpath, &st)) < 0) {
 		if (resolve && (errno == ENOENT || errno == ELOOP) &&
 		    !lstat(fpath, &st)) {
 			/* ignore */