From: Thierry Bultel Date: Fri, 30 Nov 2018 07:31:49 +0000 (+0100) Subject: filescan-utils: follow symbolic links in search X-Git-Tag: 6.99.3~4 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=b138aad247fc88f8b70d64229db43585198e4bd9;p=src%2Flibafb-helpers.git filescan-utils: follow symbolic links in search Let the directory entities of symlink type be taken into account. Change-Id: Ic0197e81d1e0c761ca6a0fe9ea2dbcb56eee447b Signed-off-by: Thierry Bultel --- diff --git a/filescan-utils.c b/filescan-utils.c index f58a2c9..1a2805f 100644 --- a/filescan-utils.c +++ b/filescan-utils.c @@ -56,7 +56,9 @@ static int ScanDir(char* searchPath, CtlScanDirModeT mode, size_t extentionLen, } // Unknown type is accepted to support dump filesystems - if (dirEnt->d_type == DT_REG || dirEnt->d_type == DT_UNKNOWN) { + if (dirEnt->d_type == DT_REG || + dirEnt->d_type == DT_UNKNOWN || + dirEnt->d_type == DT_LNK) { // check prefix and extention ssize_t extentionIdx = strlen(dirEnt->d_name) - extentionLen;