ntfs-3g_apply.c: restore root directory attributes
authorEric Biggers <ebiggers3@gmail.com>
Mon, 26 Oct 2015 02:56:45 +0000 (21:56 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sat, 7 Nov 2015 20:52:02 +0000 (14:52 -0600)
src/ntfs-3g_apply.c

index 148abc7..23ffe28 100644 (file)
@@ -517,7 +517,11 @@ ntfs_3g_create_directories(struct wim_dentry *root,
 
        root->d_inode->i_mft_no = FILE_root;
 
-       ret = ntfs_3g_create_dirs_recursive(root_ni, root, ctx);
+       ret = ntfs_3g_set_metadata(root_ni, root->d_inode, ctx);
+       if (!ret)
+               ret = ntfs_3g_create_empty_attributes(root_ni, root->d_inode, ctx);
+       if (!ret)
+               ret = ntfs_3g_create_dirs_recursive(root_ni, root, ctx);
 
        if (ntfs_inode_close(root_ni) && !ret) {
                ERROR_WITH_ERRNO("Error closing root of NTFS volume");