Changeset 517 for trunk/dll/comp.c


Ignore:
Timestamp:
Nov 2, 2006, 8:51:38 AM (14 years ago)
Author:
root
Message:

Correct . and .. detect

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/comp.c

    r448 r517  
    2121  29 Jul 06 SHL Use xfgets_bstripcr
    2222  15 Aug 06 SHL Turn off hide not selected on dir change
     23  19 Oct 06 SHL Correct . and .. detect
    2324
    2425***********************************************************************/
     
    99100                    fb->attrFile,
    100101                    (fb->cbList > 4L) ? (fb->cbList / 2L) : 0L);
    101           else if(recurse && (*fb->achName != '.' ||
    102                   (fb->achName[1] && fb->achName[1] != '.')))
     102          // Skip . and ..
     103          else if (recurse &&
     104                   (fb->achName[0] != '.' ||
     105                    (fb->achName[1] &&
     106                     (fb->achName[1] != '.' || fb->achName[2])))) {
    103107            SnapShot(mask,fp,recurse);
     108          }
    104109          nm = 1L;
    105110        } while(!DosFindNext(hdir,fb,sizeof(FILEFINDBUF4),&nm));
     
    688693        pffb = (FILEFINDBUF4 *)fb;
    689694        if(pffb->attrFile & FILE_DIRECTORY) {
    690           if(recurse && (*pffb->achName != '.' && (pffb->achName[1] &&
    691              pffb->achName[1] != '.'))) {
     695          // Skip . and ..
     696          if (recurse &&
     697              (pffb->achName[0] != '.' ||
     698               (pffb->achName[1] &&
     699                (pffb->achName[1] != '.' || pffb->achName[2])))) {
    692700            if(fForceUpper)
    693701              strupr(pffb->achName);
Note: See TracChangeset for help on using the changeset viewer.