]> wimlib.net Git - wimlib/blobdiff - src/mount.c
wimlib_mount(): Disallow mounting newly added image
[wimlib] / src / mount.c
index 4dc28f1fbc2c8fee36904530dff7c565b44c5d81..27f6551aab8f37800a2c8fe28dc5a5c1d494b156 100644 (file)
@@ -1880,7 +1880,14 @@ WIMLIBAPI int wimlib_mount(WIMStruct *wim, int image, const char *dir,
 
        if (imd->root_dentry->refcnt != 1) {
                ERROR("Cannot mount image that was just exported with "
-                     "wimlib_export()");
+                     "wimlib_export_image()");
+               ret = WIMLIB_ERR_INVALID_PARAM;
+               goto out;
+       }
+
+       if (imd->modified) {
+               ERROR("Cannot mount image that was added "
+                     "with wimlib_add_image()");
                ret = WIMLIB_ERR_INVALID_PARAM;
                goto out;
        }