Changeset 1625 for trunk/dll/avl.c


Ignore:
Timestamp:
Aug 26, 2011, 11:36:20 PM (14 years ago)
Author:
Gregg Young
Message:

Fix arc container view for .tar.gz files when using tar 1.15+ as the archiver. Ticket 473

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/avl.c

    r1616 r1625  
    4141  21 Nov 10 GKY Check if archiver.bb2 has been changed on disk before editing
    4242  13 Aug 11 GKY Change to Doxygen comment format
     43  26 Aug 11 GKY Add the code to correctly format the date time strings for tar.gz archives
     44                viewed using tar 1.15+
    4345
    4446***********************************************************************/
     
    11261128 *  96-02-08 23:55:32            4
    11271129 *  31-02-98  23:55              5
     1130 *  Aug 21 23:55 2011            6 Fixes tar.gz date/time formatting when using tar 1..15+
    11281131 */
    11291132
     
    11891192          }
    11901193          if (x < 12) {
    1191             cdate->month = x;
     1194            cdate->month = x + 1;
    11921195            p = strchr(p, ' ');
    11931196            if (p) {
     
    12301233          }
    12311234          if (x < 12) {
    1232             cdate->month = x;
     1235            cdate->month = x + 1;
    12331236            p = strchr(p, ' ');
    12341237            if (p) {
     
    13411344          }
    13421345        }
    1343         break;
    1344 
     1346        break;
     1347      case 6:
     1348        for (x = 0; x < 12; x++) {
     1349            if (!strnicmp(p, GetPString(IDS_JANUARY + x), 3))
     1350              break;
     1351          }
     1352          if (x < 12) {
     1353            cdate->month = x + 1;
     1354            p = strchr(p, ' ');
     1355            if (p) {
     1356              p++;
     1357              cdate->day = atoi(p);
     1358              p = strchr(p, ' ');
     1359              if (p) {
     1360                p++;
     1361                ctime->hours = atoi(p);
     1362                p = to_delim(pd, ":.");
     1363                if (p) {
     1364                  p++;
     1365                  ctime->minutes = atoi(p);
     1366                  p = to_delim(pd, ":.");
     1367                  p = strchr(p, ' ');
     1368                  if (p) {
     1369                    p++;
     1370                    cdate->year = atoi(p);
     1371                    if (cdate->year > 80 && cdate->year < 1900)
     1372                      cdate->year += 1900;
     1373                    else if (cdate->year < 1900)
     1374                      cdate->year += 2000;
     1375                    ret = TRUE;
     1376                  }
     1377                }
     1378              }
     1379            }
     1380          }
     1381        break;
    13451382      default:
    13461383        break;
Note: See TracChangeset for help on using the changeset viewer.