tags 804194 patch
thanks

Hi,

Wessel Dankers <[email protected]> contributed attached patch.  It
fixes this reported bug.

Boils down to:

--- squashfs-tools-4.2+20130409.orig/unsquashfs.c
+++ squashfs-tools-4.2+20130409/unsquashfs.c
@@ -786,8 +786,6 @@ int set_attributes(char *pathname, int m
 {
        struct utimbuf times = { time, time };
 
-       write_xattr(pathname, xattr);
-
        if(utime(pathname, &times) == -1) {
                ERROR("set_attributes: failed to set time on %s, because %s\n",
                        pathname, strerror(errno));
@@ -810,6 +808,8 @@ int set_attributes(char *pathname, int m
                return FALSE;
        }
 
+       write_xattr(pathname, xattr);
+
        return TRUE;
 }
 

----------------------------------------------------------------

Thanks, Bye,

Joost

-- 
Joost van Baal-Ilić                       http://abramowitz.uvt.nl/
                                                 Tilburg University
mailto:joostvb.uvt.nl                               The Netherlands
--- squashfs-tools-4.2+20130409.orig/unsquashfs.c
+++ squashfs-tools-4.2+20130409/unsquashfs.c
@@ -786,8 +786,6 @@ int set_attributes(char *pathname, int m
 {
 	struct utimbuf times = { time, time };
 
-	write_xattr(pathname, xattr);
-
 	if(utime(pathname, &times) == -1) {
 		ERROR("set_attributes: failed to set time on %s, because %s\n",
 			pathname, strerror(errno));
@@ -810,6 +808,8 @@ int set_attributes(char *pathname, int m
 		return FALSE;
 	}
 
+	write_xattr(pathname, xattr);
+
 	return TRUE;
 }
 

Attachment: signature.asc
Description: Digital signature

Reply via email to