+
+ if (dentry_add_child(dentry, child)) {
+ WARNING("Ignoring duplicate dentry \"%"WS"\"",
+ child->file_name);
+ WARNING("(In directory \"%"TS"\")", dentry_full_path(dentry));
+ free_dentry(child);
+ } else {
+ inode_add_dentry(child, child->d_inode);
+ /* If there are children of this child, call this
+ * procedure recursively. */
+ if (child->subdir_offset != 0) {
+ if (dentry_is_directory(child)) {
+ ret = read_dentry_tree(metadata_resource,
+ metadata_resource_len,
+ child);
+ if (ret)
+ break;
+ } else {
+ WARNING("Ignoring children of non-directory \"%"TS"\"",
+ dentry_full_path(child));
+ }
+ }
+
+ }