Changeset 1689 for trunk/dll/arccnrs.c


Ignore:
Timestamp:
Jul 31, 2013, 1:22:48 AM (12 years ago)
Author:
Gregg Young
Message:

Changes to get 7z archives to work with AV. Includes an ugly hack to compensate for the fact that the compressed size is missing from some files in some archives. This results in the filename being put in the nsize variable which then must be passed to fname. Fortunately it displays compressed size as 0 since it can't deal with the non numeric text string. A file name that is all numeric will show odd results. Ticket 492

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/arccnrs.c

    r1625 r1689  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2001, 2010 Steven H. Levine
     9  Copyright (c) 2001, 2013 Steven H. Levine
    1010
    1111  11 Jun 02 SHL Ensure archive name not garbage
     
    8181                aren't user settable; realappname should be used for setting applicable to
    8282                one or more miniapp but not to FM/2
    83   17 JAN 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *.
     83  17 Jan 10 GKY Changes to get working with Watcom 1.9 Beta (1/16/10). Mostly cast CHAR CONSTANT * as CHAR *.
    8484  15 Apr 10 JBS Ticket 422: Stop hang when open archive gets deleted or moved
    8585  23 Oct 10 GKY Add ForwardslashToBackslash function to streamline code
     
    8787                by temp file creation failures.
    8888  13 Aug 11 GKY Change to Doxygen comment format
     89  30 Jul 13 GKY Changes to allow 7z archiver to work with AV.
    8990
    9091***********************************************************************/
     
    727728          p = s;
    728729          for (fieldnum = 0; fieldnum <= highest; fieldnum++) {
    729             pp = p;
     730            pp = p;
    730731            while (*pp && (*pp == ' ' || *pp == '\t'))  // skip leading
    731732              pp++;
    732             if (!*pp)
    733               break;
     733            if (!*pp) {
     734              if (fieldnum == info->fnpos && (!strcmp(strupr(info->ext), "7Z") ||
     735                                             !strcmp(strupr(info->signature), "7Z")))
     736                fname = nsize;// GKY 7-30-13 Work around for missing nsize field for some members of archive
     737              break;
     738            }
    734739            wasquote = FALSE;
    735             p = pp;
     740            p = pp;
    736741            while (*p && (wasquote ||
    737742                          ((fieldnum != info->fnpos || !info->nameislast) ?
     
    749754                }
    750755              }
    751               else if (*p)
     756              else if (*p)
    752757                p++;
    753             }
     758            }
    754759            if (*p) {
    755760              *p = 0;
    756761              p++;
    757             }
     762            }
    758763            if (fieldnum == info->nsizepos)
    759764              nsize = pp;
     
    782787              }
    783788            }
    784             else if (fieldnum == info->fnpos) {
     789            else if (fieldnum == info->fnpos) {
    785790              fname = pp;
    786791              if (pp && *pp == '*' && !*(pp + 1))       // workaround for LH.EXE
     
    793798              break;
    794799            }
    795           }
     800          } // for fldnum
    796801          if (info->nameisnext) {
    797802            if (!xfgets_bstripcr
Note: See TracChangeset for help on using the changeset viewer.