tree schema UPDATE support symbolic links when searching for modules

Fixes #2242
diff --git a/src/tree_schema.c b/src/tree_schema.c
index 59e0457..a6cadc5 100644
--- a/src/tree_schema.c
+++ b/src/tree_schema.c
@@ -2115,8 +2115,8 @@
 
     *skip = 0;
 
-    if (file->d_type == DT_UNKNOWN) {
-        /* FS does not support this field, need to call stat */
+    if ((file->d_type == DT_UNKNOWN) || (file->d_type == DT_LNK)) {
+        /* FS does not support this field or its a symbolic link, need to call stat */
         if (asprintf(&str, "%s/%s", wd, file->d_name) == -1) {
             LOGMEM(NULL);
             rc = LY_EMEM;