Changeset 777 for trunk/dll/dirsize.c


Ignore:
Timestamp:
Aug 11, 2007, 11:41:10 PM (18 years ago)
Author:
Gregg Young
Message:

A safer solution to increase FindBuf for dir sizes scan

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/dirsize.c

    r774 r777  
    254254      }                                 // for matches
    255255      if (*pchStopFlag)
    256         break;
     256        break;
    257257      DosSleep(1);
    258258      nm = FilesToGet;                          /* FilesToGet */
    259259      y++;
    260260      pffb = xrealloc(pffb, y * (nm + 1) * sizeof(FILEFINDBUF4), pszSrcFile, __LINE__);
    261       DosError(FERR_DISABLEHARDERR);
    262       rc = DosFindNext(hdir, pffb, (nm + 1) * sizeof(FILEFINDBUF4), &nm);
     261      if (!pffb)
     262        break;
     263     DosError(FERR_DISABLEHARDERR);
     264      rc = DosFindNext(hdir, pffb, y * (nm + 1) * sizeof(FILEFINDBUF4), &nm);
    263265    }                                   // while more found
    264266    DosFindClose(hdir);
Note: See TracChangeset for help on using the changeset viewer.