Metadata resource compatibility
[wimlib] / src / write.c
index fd61ae1d747da0e427b8c45e8ebd869db5841385..7c4d985c7885903faaca9c0d0b9c73707ae5f4b4 100644 (file)
@@ -85,6 +85,8 @@ WIMLIBAPI int wimlib_overwrite(WIMStruct *w, int write_flags)
        ret = wimlib_write(w, tmpfile, WIM_ALL_IMAGES, write_flags);
        if (ret != 0) {
                ERROR("Failed to write the WIM file `%s'", tmpfile);
+               if (unlink(tmpfile) != 0)
+                       WARNING("Failed to remove `%s'", tmpfile);
                return ret;
        }
 
@@ -485,10 +487,11 @@ WIMLIBAPI int wimlib_write(WIMStruct *w, const char *path,
        ret = for_image(w, image, write_metadata_resource);
 
        if (ret != 0) {
-               ERROR("Failed to write WIM image metadata to `%s'", path);
+               /*ERROR("Failed to write WIM image metadata to `%s'", path);*/
                goto out;
        }
 
+
        ret = finish_write(w, image, write_flags);
 
 out: