diff options
-rw-r--r-- | lib/lchown.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/lchown.c b/lib/lchown.c index 3e2b6c9f2..0b1ebd8f2 100644 --- a/lib/lchown.c +++ b/lib/lchown.c @@ -34,7 +34,7 @@ lchown (const char *file, uid_t uid, gid_t gid) { struct stat stats; - if (lstat (file, &stats) && S_ISLNK (stats.st_mode)) + if (lstat (file, &stats) == 0 && S_ISLNK (stats.st_mode)) { errno = ENOSYS; return -1; |