From: Michael Tremer Date: Sat, 11 Jan 2025 18:27:46 +0000 (+0000) Subject: snapshots: Only consider directories or symlinks X-Git-Tag: 0.9.30~422 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2fa21c8f90677a59c198372644b52e879a61eec;p=pakfire.git snapshots: Only consider directories or symlinks Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/snapshot.c b/src/pakfire/snapshot.c index 5b1b4014f..a09c71548 100644 --- a/src/pakfire/snapshot.c +++ b/src/pakfire/snapshot.c @@ -162,6 +162,17 @@ static int pakfire_snapshot_filter(const struct dirent* dirent) { time_t now; int r; + // Only consider directories or symlinks + switch (dirent->d_type) { + case DT_DIR: + case DT_LNK: + break; + + // Ignore the rest + default: + return 0; + } + // Skip any hidden directories if (*dirent->d_name == '.') return 0;