Changeset 1118 for trunk/dll


Ignore:
Timestamp:
Aug 24, 2008, 10:52:23 PM (17 years ago)
Author:
Gregg Young
Message:

Clean up of fix for trap caused by FM/2 being on a full disk. It now preserves the data files. (Ticket 152, 271)

Location:
trunk/dll
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/assoc.c

    r1117 r1118  
    266266#endif
    267267  BldFullPathName(s, pFM2SaveDirectory, "ASSOC.DAT");
    268   if (CheckDriveSpaceAvail(s, ullDATFileSpaceNeeded, 0) == 2)
     268  if (CheckDriveSpaceAvail(s, ullDATFileSpaceNeeded, 1) == 2)
    269269    return; //already gave error msg
    270270  fp = xfopen(s, "w", pszSrcFile, __LINE__);
  • trunk/dll/avv.c

    r1115 r1118  
    182182}
    183183
    184 #pragma alloc_text (AVV2,nonull,rewrite_archiverbb2,checkfile)
    185184
    186185// nonull - convert NULL pointer to empty string
     
    225224    archiverbb2 = GetPString(IDS_ARCHIVERBB2);
    226225  }
     226  /* Check space on drive*/
     227  if (CheckDriveSpaceAvail(archiverbb2, ullDATFileSpaceNeeded * 4, 1) == 2) //* 4 is because this file is larger than other .dat files
     228    return; //already gave error msg
    227229
    228230  /* save a backup */
     
    236238    fpOld = fopen(sz, "r");             // OK for file not to exist
    237239  }
    238   if (CheckDriveSpaceAvail(archiverbb2, ullDATFileSpaceNeeded * 4, 0) == 2) //* 4 is because this file is larger than other .dat files
    239     return; //already gave error msg
     240
    240241  fpNew = fopen(archiverbb2, "w");
    241242
     
    402403}
    403404
    404 #pragma alloc_text (AVV3,check_archiver,ArcReviewDlgProc)
    405405
    406406static BOOL check_archiver(HWND hwnd, ARC_TYPE * info)
     
    967967#pragma alloc_text(AVV,get_long_from_window,get_int3_from_window)
    968968#pragma alloc_text(AVV,get_int4_from_window,free_and_strdup_quoted_from_window)
     969#pragma alloc_text (AVV2,nonull,rewrite_archiverbb2,checkfile)
     970#pragma alloc_text (AVV3,check_archiver,ArcReviewDlgProc)
  • trunk/dll/cmdline.c

    r1117 r1118  
    129129    return;
    130130  BldFullPathName(pszCmdLine, pFM2SaveDirectory, (DoItYourself) ? "CMDLINES.DAT" : "CMDMINI.DAT");
    131   if (CheckDriveSpaceAvail(pszCmdLine, ullDATFileSpaceNeeded, 0) == 2)
     131  if (CheckDriveSpaceAvail(pszCmdLine, ullDATFileSpaceNeeded, 1) == 2)
    132132    return; //already gave error msg
    133133  if (CmdLineHead) {
  • trunk/dll/command.c

    r1117 r1118  
    398398  info = cmdhead;
    399399  BldFullPathName(s, pFM2SaveDirectory, "COMMANDS.DAT");
    400   if (CheckDriveSpaceAvail(s, ullDATFileSpaceNeeded, 0) == 2)
     400  if (CheckDriveSpaceAvail(s, ullDATFileSpaceNeeded, 1) == 2)
    401401    return; //already gave error msg
    402402  fp = xfopen(s, "w", pszSrcFile, __LINE__);
  • trunk/dll/filter.c

    r1117 r1118  
    175175  if (maskhead) {
    176176    BldFullPathName(s, pFM2SaveDirectory, "FILTER.DAT");
    177     if (CheckDriveSpaceAvail(s, ullDATFileSpaceNeeded, 0) == 2)
     177    if (CheckDriveSpaceAvail(s, ullDATFileSpaceNeeded, 1) == 2)
    178178    return; //already gave error msg
    179179    fp = xfopen(s, "w", pszSrcFile, __LINE__);
  • trunk/dll/grep2.c

    r1117 r1118  
    948948        if (sSelect > 0) {
    949949          BldFullPathName(s, pFM2SaveDirectory, "GREPMASK.DAT");
    950           if (CheckDriveSpaceAvail(s, ullDATFileSpaceNeeded, 0) == 2)
     950          if (CheckDriveSpaceAvail(s, ullDATFileSpaceNeeded, 1) == 2)
    951951            break; //already gave error msg
    952952          fp = xfopen(s, "w", pszSrcFile, __LINE__);
  • trunk/dll/misc.c

    r1112 r1118  
    22512251    }
    22522252    else {
    2253       if (ullFreeQty - ullSpaceNeeded > 0) {
     2253      if (ullFreeQty > ullSpaceNeeded) {
    22542254        ret = saymsg(MB_YESNO,
    22552255                     HWND_DESKTOP,
  • trunk/dll/remap.c

    r1117 r1118  
    112112    return;
    113113  BldFullPathName(s, pFM2SaveDirectory, "RESOURCE.DAT");
    114   if (CheckDriveSpaceAvail(s, ullDATFileSpaceNeeded, 0) == 2)
     114  if (CheckDriveSpaceAvail(s, ullDATFileSpaceNeeded, 1) == 2)
    115115    return; //already gave error msg
    116116  if (reshead) {
  • trunk/dll/saveclip.c

    r1117 r1118  
    282282      if (sMax > 0) {
    283283        BldFullPathName(szBuffer, pFM2SaveDirectory, "PATTERNS.DAT");
    284         if (CheckDriveSpaceAvail(szBuffer, ullDATFileSpaceNeeded, 0) == 2)
     284        if (CheckDriveSpaceAvail(szBuffer, ullDATFileSpaceNeeded, 1) == 2)
    285285          break; //already gave error msg
    286286        fp = xfopen(szBuffer, "w", pszSrcFile, __LINE__);
     
    637637      if (sMax > 0) {
    638638        BldFullPathName(szBuffer, pFM2SaveDirectory, "PATTERNS.DAT");
    639         if (CheckDriveSpaceAvail(szBuffer, ullDATFileSpaceNeeded, 0) == 2)
     639        if (CheckDriveSpaceAvail(szBuffer, ullDATFileSpaceNeeded, 1) == 2)
    640640          break; //already gave error msg
    641641        fp = xfopen(szBuffer, "w", pszSrcFile, __LINE__);
  • trunk/dll/tools.c

    r1117 r1118  
    9393    return;
    9494  BldFullPathName(s, pFM2SaveDirectory, "QUICKTLS.DAT");
    95   if (CheckDriveSpaceAvail(s, ullDATFileSpaceNeeded, 0) == 2)
     95  if (CheckDriveSpaceAvail(s, ullDATFileSpaceNeeded, 1) == 2)
    9696    return; //already gave error msg
    9797  fp = xfopen(s, "w", pszSrcFile, __LINE__);
     
    210210    return;
    211211  }
    212   if (CheckDriveSpaceAvail(filename, ullDATFileSpaceNeeded, 0) == 2)
     212  if (CheckDriveSpaceAvail(filename, ullDATFileSpaceNeeded, 1) == 2)
    213213    return; //already gave error msg
    214214  fp = xfopen(filename, "w", pszSrcFile, __LINE__);
  • trunk/dll/walkem.c

    r1117 r1118  
    403403    if (udirhead) {
    404404      BldFullPathName(s, pFM2SaveDirectory, "USERDIRS.DAT");
    405       if (CheckDriveSpaceAvail(s, ullDATFileSpaceNeeded, 0) == 2)
     405      if (CheckDriveSpaceAvail(s, ullDATFileSpaceNeeded, 1) == 2)
    406406        return; //already gave error msg
    407407      fp = xfopen(s, "w", pszSrcFile, __LINE__);
Note: See TracChangeset for help on using the changeset viewer.