]> wimlib.net Git - wimlib/blobdiff - src/xml.c
wimlib_get_xml_data(): should use NO_FILENAME error
[wimlib] / src / xml.c
index 58750a1f1eb4d907a56b2162f18de42900536dfe..279c3382366a7676471c73ed1ded936ed6b8606a 100644 (file)
--- a/src/xml.c
+++ b/src/xml.c
@@ -1581,7 +1581,7 @@ write_wim_xml_data(WIMStruct *wim, int image, u64 total_bytes,
         * compressed XML data, MS software cannot.  */
        ret = write_wim_resource_from_buffer(xml_data,
                                             xml_len,
-                                            WIM_RESHDR_FLAG_METADATA,
+                                            true,
                                             &wim->out_fd,
                                             WIMLIB_COMPRESSION_TYPE_NONE,
                                             0,
@@ -1631,7 +1631,7 @@ wimlib_get_xml_data(WIMStruct *wim, void **buf_ret, size_t *bufsize_ret)
        const struct wim_reshdr *xml_reshdr;
 
        if (wim->filename == NULL && filedes_is_seekable(&wim->in_fd))
-               return WIMLIB_ERR_INVALID_PARAM;
+               return WIMLIB_ERR_NO_FILENAME;
 
        if (buf_ret == NULL || bufsize_ret == NULL)
                return WIMLIB_ERR_INVALID_PARAM;