diff --git a/src/library/util.c b/src/library/util.c index 492a224..671b177 100644 --- a/src/library/util.c +++ b/src/library/util.c @@ -44,11 +44,14 @@ bool find_sources(const char *path, package_match_func match, bool recurse) return false; } - if (stat(path, &st) != 0) { + if (lstat(path, &st) != 0) { goto end; } - if (S_ISDIR(st.st_mode)) { + if (S_ISLNK(st.st_mode)) { + ret = false; + goto end; + } else if (S_ISDIR(st.st_mode)) { if (!(dir = opendir(path))) { goto end; }