filescan-utils: follow symbolic links in search 95/18495/1 flounder 6.0.3 6.0.4 6.0.5 flounder/6.0.3 flounder/6.0.4 flounder/6.0.5 flounder_6.0.3 flounder_6.0.4 flounder_6.0.5
authorThierry Bultel <thierry.bultel@iot.bzh>
Fri, 30 Nov 2018 07:31:49 +0000 (08:31 +0100)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Fri, 30 Nov 2018 17:46:01 +0000 (17:46 +0000)
Let the directory entities of symlink type be taken into
account.

Change-Id: Ic0197e81d1e0c761ca6a0fe9ea2dbcb56eee447b
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
filescan-utils.c

index f58a2c9..1a2805f 100644 (file)
@@ -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;