90e304
--- a/squashfs-tools/unsquashfs.c	2021-01-14 14:34:49.658184361 -0600
90e304
+++ b/squashfs-tools/unsquashfs.c	2021-01-14 14:50:19.604100949 -0600
90e304
@@ -822,8 +822,6 @@ int set_attributes(char *pathname, int m
90e304
 {
90e304
 	struct utimbuf times = { time, time };
90e304
 
90e304
-	write_xattr(pathname, xattr);
90e304
-
90e304
 	if(utime(pathname, &times) == -1) {
90e304
 		ERROR("set_attributes: failed to set time on %s, because %s\n",
90e304
 			pathname, strerror(errno));
90e304
@@ -846,6 +844,8 @@ int set_attributes(char *pathname, int m
90e304
 		return FALSE;
90e304
 	}
90e304
 
90e304
+	write_xattr(pathname, xattr);
90e304
+
90e304
 	return TRUE;
90e304
 }
90e304