- image_for_each_inode(inode, imd) {
- for (i = 0; i < inode->i_num_streams; i++) {
- blob = stream_blob(&inode->i_streams[i],
- wim->blob_table);
- if (blob) {
- if (blob->out_refcnt == 0)
- list_add(&blob->orig_blob_list,
- &ctx.orig_blob_list);
- blob->out_refcnt += inode->i_nlink;
- blob->refcnt += inode->i_nlink;
- }
- }
- }
- }
-
- /* Assign new inode numbers. */
- reassign_inode_numbers(&ctx);
-
- /* If a read-write mount, mark the image as modified. */
- if (mount_flags & WIMLIB_MOUNT_FLAG_READWRITE)
- imd->modified = 1;
+ /* Save the absolute path to the mountpoint directory. */
+ ctx.mountpoint_abspath = realpath(dir, NULL);
+ if (ctx.mountpoint_abspath)
+ ctx.mountpoint_abspath_nchars = strlen(ctx.mountpoint_abspath);