Ticket #1540: xz.patch

File xz.patch, 586 bytes (added by nixtrian, 15 years ago)

This patch fixes recognizing of tar.xz

  • .c

    old new  
    922922 
    923923    /* XZ compression magic */ 
    924924    if (magic[0] == 0xFD 
    925         && magic[1] == 0x37 && magic[2] == 0x7A && magic[3] == 0x58) { 
    926         if (mc_read (fd, (char *) magic + 4, 2) == 2) { 
    927             if (magic[4] == 0x5A && magic[5] == 0x00) { 
     925        && magic[1] == 0x37 
     926         && magic[2] == 0x7A 
     927          && magic[3] == 0x58 
     928           && magic[4] == 0x5A 
     929            && magic[5] == 0x00) { 
    928930                return COMPRESSION_XZ; 
    929             } 
    930931        } 
    931     } 
    932932 
    933933    return COMPRESSION_NONE; 
    934934}