From: Eric Biggers Date: Wed, 19 Dec 2012 16:08:06 +0000 (-0600) Subject: do_apply_dentry_ntfs(): Adjust inode closing X-Git-Tag: v1.2.1~9 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=051e6d3d1c88715d21b422fbcc806ab02d61ab67 do_apply_dentry_ntfs(): Adjust inode closing --- diff --git a/src/ntfs-apply.c b/src/ntfs-apply.c index 0bfc060e..ab46c917 100644 --- a/src/ntfs-apply.c +++ b/src/ntfs-apply.c @@ -506,7 +506,8 @@ out_set_dos_name: dentry->file_name_utf8); if (!ni) { ERROR_WITH_ERRNO("Could not find NTFS inode for `%s'", - dir_name); + dentry->full_path_utf8); + ntfs_inode_close(dir_ni); return WIMLIB_ERR_NTFS_3G; } } @@ -527,6 +528,15 @@ out_set_dos_name: } out_close_dir_ni: + if (ni && dir_ni) { + if (ntfs_inode_close_in_dir(ni, dir_ni) != 0) { + ni = NULL; + if (ret == 0) + ret = WIMLIB_ERR_NTFS_3G; + ERROR_WITH_ERRNO("Failed to close inode for `%s'", + dentry->full_path_utf8); + } + } if (ntfs_inode_close(dir_ni) != 0) { if (ret == 0) ret = WIMLIB_ERR_NTFS_3G; @@ -535,7 +545,8 @@ out_close_dir_ni: if (ni && ntfs_inode_close(ni) != 0) { if (ret == 0) ret = WIMLIB_ERR_NTFS_3G; - ERROR_WITH_ERRNO("Failed to close inode"); + ERROR_WITH_ERRNO("Failed to close inode for `%s'", + dentry->full_path_utf8); } return ret; }