Changeset 837
- Timestamp:
- Sep 21, 2007, 9:17:59 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
HISTORY (modified) (1 diff)
-
dll/grep.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/HISTORY
r834 r837 3 3 3.08 (pending) 4 4 o Rework filemask logic to match last extension and allow for string matching (Gregg) 5 o Fix trap on search where file name length exceeds maxpath (Gregg) 5 6 6 7 3.07 -
trunk/dll/grep.c
r813 r837 26 26 26 Aug 07 GKY Improved performance of FillDups 27 27 26 Aug 07 GKY DosSleep(1) in loops changed to (0) 28 21 Sep 07 GKY Fix trap on search that includes filenames that exceed maxpath 28 29 29 30 ***********************************************************************/ … … 411 412 // step through all subdirectories 412 413 DosError(FERR_DISABLEHARDERR); 413 if (!DosFindFirst(searchPath, &findHandle, (MUST_HAVE_DIRECTORY | 414 FILE_ARCHIVED | FILE_SYSTEM | 415 FILE_HIDDEN | FILE_READONLY), 416 &ffb, (ULONG) sizeof(ffb), 417 (PULONG) & ulFindCnt, FIL_QUERYEASIZE)) { 414 if (!xDosFindFirst(searchPath, &findHandle, (MUST_HAVE_DIRECTORY | 415 FILE_ARCHIVED | FILE_SYSTEM | FILE_HIDDEN | FILE_READONLY), 416 &ffb, (ULONG) sizeof(ffb), 417 (PULONG) & ulFindCnt, FIL_QUERYEASIZE)) { 418 418 419 419 // get rid of mask portion, save end-of-directory … … 440 440 } 441 441 ulFindCnt = 1; 442 } while (! DosFindNext(findHandle,443 &ffb,444 sizeof(ffb), (PULONG) & ulFindCnt));442 } while (!xDosFindNext(findHandle, 443 &ffb, 444 sizeof(ffb), (PULONG) & ulFindCnt)); 445 445 DosFindClose(findHandle); 446 446 priority_normal(); … … 487 487 DosError(FERR_DISABLEHARDERR); 488 488 ulFindCnt = FilesToGet; 489 rc = DosFindFirst(szFindPath,490 &findHandle,491 FILE_NORMAL | grep->attrFile | grep->antiattr,492 pffbArray,493 ulBufBytes,494 &ulFindCnt,495 FIL_QUERYEASIZE);489 rc = xDosFindFirst(szFindPath, 490 &findHandle, 491 FILE_NORMAL | grep->attrFile | grep->antiattr, 492 pffbArray, 493 ulBufBytes, 494 &ulFindCnt, 495 FIL_QUERYEASIZE); 496 496 if (!rc) { 497 497 do { … … 503 503 break; 504 504 if (*pffbFile->achName != '.' || 505 (pffbFile->achName[1] && pffbFile->achName[1] != '.')) { 506 strcpy(p, pffbFile->achName); // build filename 505 (pffbFile->achName[1] && pffbFile->achName[1] != '.')) { 506 strcpy(p, pffbFile->achName); // build filename 507 if (strlen(szFindPath) > 256){ //21 Sep GKY check for pathnames that exceed maxpath 508 DosFindClose(findHandle); 509 free(pffbArray); 510 return 1; 511 } 507 512 if (!grep->anyexcludes || !IsExcluded(szFindPath, fle, numfls)) { 508 513 if (!grep->finddupes) … … 523 528 DosSleep(0); //26 Aug 07 GKY 1 524 529 ulFindCnt = FilesToGet; 525 rc = DosFindNext(findHandle, pffbArray, ulBufBytes, &ulFindCnt);530 rc = xDosFindNext(findHandle, pffbArray, ulBufBytes, &ulFindCnt); 526 531 } while (!rc); 527 532
Note:
See TracChangeset
for help on using the changeset viewer.
