delta.c: fix xattr test after patching

At the moment, swupd_create_pack fails when some files have xattrs and
get patched because the xattrs of the test file do not match the
original, unpatched file.

That's because xattrs_copy() was applied to the wrong target file.

Fixes: swupd-server/#35

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
This commit is contained in:
Patrick Ohly
2016-11-15 11:28:26 -08:00
committed by tmarcu
parent 2401aae76e
commit 2890a11c5a
+1 -1
View File
@@ -97,7 +97,7 @@ void __create_delta(struct file *file, int from_version, char *from_hash)
ret = 0;
goto out;
}
xattrs_copy(original, newfile);
xattrs_copy(original, testnewfile);
/* does xattrs have been correctly copied?*/
if (xattrs_compare(original, testnewfile) != 0) {