]> wimlib.net Git - wimlib/blobdiff - src/mount_image.c
Rewrite make_huffman_decode_table()
[wimlib] / src / mount_image.c
index 7f0a2aa01eb64b1c2475cd8b19a649b907414feb..090a828026e95e197180cf96bd8f4513125a9208 100644 (file)
@@ -291,7 +291,7 @@ static int create_dentry(struct wimfs_context *ctx, const char *path,
 
        new = new_dentry_with_inode(basename);
        if (!new)
-               return -ENOMEM;
+               return -errno;
 
        new->d_inode->resolved = 1;
        new->d_inode->ino = ctx->next_ino++;
@@ -1609,7 +1609,7 @@ static int wimfs_link(const char *to, const char *from)
                return -EEXIST;
        from_dentry = new_dentry(link_name);
        if (!from_dentry)
-               return -ENOMEM;
+               return -errno;
 
        inode_add_dentry(from_dentry, inode);
        from_dentry->d_inode = inode;
@@ -2370,6 +2370,9 @@ WIMLIBAPI int wimlib_mount_image(WIMStruct *wim, int image, const char *dir,
                goto out;
        }
 
+       if (imd->inode_list.first)
+               imd->inode_list.first->pprev = &imd->inode_list.first;
+
        if (imd->modified) {
                ERROR("Cannot mount image that was added "
                      "with wimlib_add_image()");