Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions file_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ static int get_dirent_type(struct dirent *entry, int fd, const char *path)
* convenience of the caller.
*/
ret = statx(fd, entry->d_name, AT_SYMLINK_NOFOLLOW, STATX_BASIC_STATS, &st);
if (ret || !(st.stx_mask & STATX_BASIC_STATS)) {
if (ret || (st.stx_mask & STATX_BASIC_STATS) != STATX_BASIC_STATS) {
eprintf("Error %d: %s while getting type of file %s/%s. "
"Skipping.\n",
errno, strerror(errno), path, entry->d_name);
Expand Down Expand Up @@ -541,7 +541,7 @@ static int walk_dir(char *path, struct dbhandle *db)
sprintf(child, "%s/%s", path, entry->d_name);

ret = statx(0, child, 0, STATX_BASIC_STATS, &st);
if (ret || !(st.stx_mask | STATX_BASIC_STATS)) {
if (ret || (st.stx_mask & STATX_BASIC_STATS) != STATX_BASIC_STATS) {
eprintf("Failed to stat %s: %s\n",
path, strerror(errno));
continue;
Expand Down Expand Up @@ -731,7 +731,7 @@ int scan_file(char *in_path, struct dbhandle *db)
}

ret = statx(0, path, 0, STATX_BASIC_STATS, &st);
if (ret || !(st.stx_mask & STATX_BASIC_STATS)) {
if (ret || (st.stx_mask & STATX_BASIC_STATS) != STATX_BASIC_STATS) {
eprintf("Error %d: %s while stating file %s. "
"Skipping.\n",
errno, strerror(errno), path);
Expand Down