30 lines
749 B
Diff
30 lines
749 B
Diff
|
|
From e92be090a8a82c679a65bc0c885e259c3c64cc51 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Lee Duncan <lduncan@suse.com>
|
||
|
|
Date: Thu, 25 Jun 2020 10:04:40 -0700
|
||
|
|
Subject: [PATCH 8/9] Use stat() not lstat() to find link target.
|
||
|
|
|
||
|
|
The test was backwards? We are trying to find what the
|
||
|
|
link points at, not info about the link.
|
||
|
|
|
||
|
|
Signed-off-by: Lee Duncan <lduncan@suse.com>
|
||
|
|
---
|
||
|
|
test/test.c | 2 +-
|
||
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
|
||
|
|
diff --git a/test/test.c b/test/test.c
|
||
|
|
index f63e346..aea34c1 100644
|
||
|
|
--- a/test/test.c
|
||
|
|
+++ b/test/test.c
|
||
|
|
@@ -165,7 +165,7 @@ static int path_is_dir(const char *path)
|
||
|
|
{
|
||
|
|
struct stat astats;
|
||
|
|
|
||
|
|
- if ((lstat(path, &astats)) != 0)
|
||
|
|
+ if ((stat(path, &astats)) != 0)
|
||
|
|
goto direrr;
|
||
|
|
|
||
|
|
if (S_ISDIR(astats.st_mode))
|
||
|
|
--
|
||
|
|
1.8.3.1
|
||
|
|
|