]> wimlib.net Git - wimlib/blobdiff - src/mount.c
Various fixes and cleanups
[wimlib] / src / mount.c
index b0d256e2796eff72ea8e02f0ee056fef144ef07a..3c50c7501f26d680db96b2ec03a3c3bcbdd97f6c 100644 (file)
@@ -1921,6 +1921,12 @@ WIMLIBAPI int wimlib_mount_image(WIMStruct *wim, int image, const char *dir,
                wim->lookup_table = joined_tab;
        }
 
+       if (mount_flags & WIMLIB_MOUNT_FLAG_READWRITE) {
+               ret = wim_run_full_verifications(wim);
+               if (ret != 0)
+                       goto out;
+       }
+
        ret = select_wim_image(wim, image);
 
        if (ret != 0)
@@ -2018,8 +2024,8 @@ WIMLIBAPI int wimlib_mount_image(WIMStruct *wim, int image, const char *dir,
 
        /* Mark dentry tree as modified if read-write mount. */
        if (mount_flags & WIMLIB_MOUNT_FLAG_READWRITE) {
-               imd->modified = true;
-               imd->has_been_mounted_rw = true;
+               imd->modified = 1;
+               imd->has_been_mounted_rw = 1;
        }
 
        /* Resolve all the lookup table entries of the dentry tree */