Changeset 1753 for trunk/dll/arccnrs.c


Ignore:
Timestamp:
Mar 2, 2014, 7:58:53 PM (11 years ago)
Author:
Gregg Young
Message:

Fixed typo that reversed the function of the saymsg dialog g/bzip check. Added option to suppress message regarding missing bzip2.exe or gzip.exe on TAR.B/GZ archives. Ticket 526

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/arccnrs.c

    r1752 r1753  
    626626    if (!nobzip) {
    627627      ftarbz = TRUE;
    628       if (DosQueryAppType("bzip.exe" , &apptype)) {
     628      if (DosQueryAppType("bzip2.exe" , &apptype)) {
    629629        nobzip = TRUE;
    630         temp = saymsg(MB_YESNO, HWND_DESKTOP, NullStr, GetPString(IDS_ARCNOBZIP));
    631         if (temp != MBID_NO)
    632           return 0;                                               
     630        if (!fDontAskBzip) {
     631          temp = saymsg2(NULL, 3,
     632                         HWND_DESKTOP,
     633                         NullStr,
     634                         GetPString(IDS_ARCNOBZIP));
     635          if (temp == SM2_NO ||temp == SM2_CANCEL)
     636            return 0;
     637          else if (temp == SM2_DONTASK) {
     638            fDontAskBzip = TRUE;
     639            PrfWriteProfileData(fmprof, FM3Str, "DontAskBzip", &fDontAskBzip, sizeof(BOOL));
     640          }
     641        }
    633642      }                                                           
    634643    }                                                             
    635     else if (!nogzip) {                                           
    636       ftargz = TRUE;                                             
     644    else if (!nogzip) {
     645      ftargz = TRUE;
    637646      if (DosQueryAppType("gzip.exe" , &apptype)) {
    638647        nogzip = TRUE;
    639         temp = saymsg(MB_YESNO, HWND_DESKTOP, NullStr, GetPString(IDS_ARCNOGZIP));
    640         if (temp != MBID_NO)
    641           return 0;
     648        if (!fDontAskGzip) {
     649          temp = saymsg2(NULL, 3,
     650                         HWND_DESKTOP,
     651                         NullStr,
     652                         GetPString(IDS_ARCNOGZIP));
     653          if (temp == SM2_NO || temp == SM2_CANCEL)
     654            return 0;
     655          else if (temp == SM2_DONTASK) {
     656            fDontAskGzip = TRUE;
     657            PrfWriteProfileData(fmprof, FM3Str, "DontAskGzip", &fDontAskGzip, sizeof(BOOL));
     658          }
     659        }
    642660      }
    643661    }
     
    734752                if (info->test)
    735753                  strcpy(TestStr, info->test);
    736                 else
     754                else {
     755                  strcpy(TestStr, "");
    737756                  notest = TRUE;
     757                }
    738758              }
    739759              else if (notest && info->test) {
     
    9901010          }
    9911011          else if ((ftarbz && !nobzip) || (ftargz && !nogzip))
    992             info->test = xstrdup(ftarbz ? "bzip.exe -t" : "gzip.exe - t",
     1012            info->test = xstrdup(ftarbz ? "bzip2.exe -t" : "gzip.exe - t",
    9931013                                 pszSrcFile, __LINE__);
     1014          else if (rc) {
     1015            strcpy(Temp, info->test);
     1016            info->test = NULL;
     1017          }
    9941018          ad.errmsg = errstr;
    9951019          WinDlgBox(HWND_DESKTOP,
     
    10001024          else if ((ftarbz && !nobzip) || (ftargz && !nogzip))
    10011025            info->test = xstrdup("", pszSrcFile, __LINE__);
     1026          else if (rc)
     1027            info->test = xstrdup(Temp, pszSrcFile, __LINE__);
    10021028        }
    10031029        else
Note: See TracChangeset for help on using the changeset viewer.