aboutsummaryrefslogtreecommitdiff
path: root/lib/util/src
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-04-21 20:16:49 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-04-21 20:16:49 +0200
commit6c7d1c6e6cb3187218fa180fc87919255928b999 (patch)
tree5d8441245417de8110033306c16b4fd2d4ea3a89 /lib/util/src
parent73d342861a03c38528ca5f97cdd479b4fdb5b3fd (diff)
Fix: libutil: type check bug in unix directory iterator read_link
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/util/src')
-rw-r--r--lib/util/src/unix_dir_iterator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/util/src/unix_dir_iterator.c b/lib/util/src/unix_dir_iterator.c
index ae878a2..3f23311 100644
--- a/lib/util/src/unix_dir_iterator.c
+++ b/lib/util/src/unix_dir_iterator.c
@@ -45,7 +45,7 @@ static int dir_read_link(dir_iterator_t *base, char **out)
return SQFS_ERROR_INTERNAL;
}
- if (S_ISLNK(it->sb.st_mode)) {
+ if (!S_ISLNK(it->sb.st_mode)) {
fprintf(stderr, "[BUG] %s is not a symlink, cannot readlink\n",
it->ent->d_name);
it->state = SQFS_ERROR_INTERNAL;