Changeset 1120 for trunk/dll/init.c


Ignore:
Timestamp:
Aug 26, 2008, 3:08:28 AM (17 years ago)
Author:
Gregg Young
Message:

Check TMP directory space warn if lee than 5 MiB prevent archiver from opening if less than 10 KiB (It hangs and can't be closed) (Ticket 214) Also some cleanup of the error messages for CheckDriveSpaceAvail.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/init.c

    r1117 r1120  
    714714        if (!ret) {   //check writable
    715715          pTmpDir = xstrdup(szTempName, pszSrcFile, __LINE__);
    716         } //fixme to check freespace > 5 MB
     716        }
    717717      }
    718718    }
     
    725725    pFM2SaveDirectory = xstrdup(temp, pszSrcFile, __LINE__);
    726726  }
     727  // Check free space on TMP and FM2 Save drives
    727728  {
    728     CHAR szKBTmp[20];
    729 
    730729    ullTmpSpaceNeeded = 5120000;
    731     CommaFmtULL(szKBTmp, sizeof(szKBTmp),
    732                 ullTmpSpaceNeeded, 'M');
    733     printf("%s\r", szKBTmp); fflush(stdout);
    734730    if (pTmpDir && CheckDriveSpaceAvail(pTmpDir, ullTmpSpaceNeeded, 0) == 1) {
    735731      if (CheckDriveSpaceAvail(pFM2SaveDirectory, ullTmpSpaceNeeded, 0) == 0){
     
    738734                     NullStr,
    739735                     GetPString(IDS_TMPDRIVESPACELIMITED),
    740                      pTmpDir,
    741                      szKBTmp);
     736                     pTmpDir);
    742737        if (ret == MBID_YES)
    743738          pTmpDir = pFM2SaveDirectory;
     
    749744               GetPString(IDS_SAVETMPDRIVESPACELIMITED),
    750745               pTmpDir,
    751                szKBTmp,
    752                pFM2SaveDirectory,
    753                szKBTmp);
     746               pFM2SaveDirectory);
    754747    }
    755748    else if (CheckDriveSpaceAvail(pFM2SaveDirectory, ullTmpSpaceNeeded, 0) == 1)
     
    758751             NullStr,
    759752             GetPString(IDS_SAVEDRIVESPACELIMITED),
    760              pFM2SaveDirectory,
    761              szKBTmp);
     753             pFM2SaveDirectory);
    762754  }
    763755  BldFullPathName(ArcTempRoot, pTmpDir, fAmAV2 ? "$AV$ARC$" : "$FM$ARC$");
Note: See TracChangeset for help on using the changeset viewer.