]> wimlib.net Git - wimlib/blobdiff - src/dentry.c
Implement readlink() on WIM filesystem
[wimlib] / src / dentry.c
index 56a06041cb92c2e180583d22588da30b1a2cd764..a25680f9f7d5f4ec4d514784f8040da7f3f46d6f 100644 (file)
@@ -64,7 +64,9 @@ void dentry_to_stbuf(const struct dentry *dentry, struct stat *stbuf,
 {
        struct lookup_table_entry *lte;
 
-       if (dentry_is_directory(dentry))
+       if (dentry_is_symlink(dentry))
+               stbuf->st_mode = S_IFLNK | 0777;
+       else if (dentry_is_directory(dentry))
                stbuf->st_mode = S_IFDIR | 0755;
        else
                stbuf->st_mode = S_IFREG | 0644;