Changeset 1120 for trunk/dll/arccnrs.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/arccnrs.c

    r1117 r1120  
    5757  16 Jul 08 GKY Use TMP directory for temp files if present. Use MakeTempName
    5858  19 Jul 08 GKY Replace save_dir2(dir) with pFM2SaveDirectory
     59  25 Aug 08 GKY Check TMP directory space warn if lee than 5 MiB prevent archiver from opening if
     60                less than 10 KiB (It hangs and can't be closed)
    5961
    6062***********************************************************************/
     
    444446    info = find_type(arcname, NULL);
    445447  arctemp = xmallocz(CCHMAXPATH, pszSrcFile, __LINE__);
     448  if (CheckDriveSpaceAvail(ArcTempRoot, ullDATFileSpaceNeeded, ullTmpSpaceNeeded) == 1)
     449    saymsg(MB_OK,
     450           HWND_DESKTOP,
     451           NullStr,
     452           GetPString(IDS_ARCTMPDRIVESPACELIMITED),
     453           ArcTempRoot);
    446454  MakeTempName(arctemp, ArcTempRoot, 2);
     455
    447456
    448457ReTry:
     
    21352144                         CM_SEARCHSTRING,
    21362145                         MPFROMP(&srch), MPFROMLONG(CMA_FIRST));
    2137         if (pci && (INT) pci != -1) {
    2138 
    2139           USHORT attrib = CRA_CURSORED;
     2146        if (pci && (INT) pci != -1) {
     2147
     2148          USHORT attrib = CRA_CURSORED;
     2149
    21402150
    21412151          /* make found item current item */
     
    22812291                           CM_QUERYRECORDEMPHASIS,
    22822292                           MPFROMLONG(CMA_FIRST), MPFROMSHORT(CRA_CURSORED));
    2283           if (pci && (INT) pci != -1) {
     2293          if (pci && (INT) pci != -1) {
    22842294            if (fSplitStatus && hwndStatus2) {
    22852295              if (dcd->ullTotalBytes)
     
    26352645        OpenDirCnr((HWND) 0, hwndMain, dcd->hwndFrame, FALSE, (char *)mp1);
    26362646      }
    2637       else if (mp1 && IsFile(mp1) == 1) {
     2647      else if (mp1 && IsFile(mp1) == 1 &&
     2648               CheckDriveSpaceAvail(ArcTempRoot, ullDATFileSpaceNeeded, ullTmpSpaceNeeded) != 2) {
    26382649        StartArcCnr(HWND_DESKTOP,
    26392650                    dcd->hwndFrame, (CHAR *) mp1, 4, (ARC_TYPE *) mp2);
     
    33653376    ArcMenu = ArcCnrMenu = (HWND) 0;
    33663377    EmptyArcCnr(hwnd);
     3378#     ifdef FORTIFY
     3379    Fortify_LeaveScope();
     3380#     endif
    33673381    break;
    33683382  }
Note: See TracChangeset for help on using the changeset viewer.