Subversion Repositories SvarDOS

Rev

Rev 2055 | Rev 2057 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2055 Rev 2056
Line 565... Line 565...
565
 * e.g. attribute, dates, etc.
565
 * e.g. attribute, dates, etc.
566
 */
566
 */
567
typedef struct DIRDATA {
567
typedef struct DIRDATA {
568
  unsigned long subdirCnt;  /* how many subdirectories we have */
568
  unsigned long subdirCnt;  /* how many subdirectories we have */
569
  unsigned long fileCnt;    /* how many [normal] files we have */
569
  unsigned long fileCnt;    /* how many [normal] files we have */
570
  unsigned short attrib;    /* Directory attributes            */
570
  unsigned int attrib;      /* Directory attributes            */
571
} DIRDATA;
571
} DIRDATA;
572
 
572
 
573
/**
573
/**
574
 * Contains the information stored in a Stack necessary to allow
574
 * Contains the information stored in a Stack necessary to allow
575
 * non-recursive function to display directory tree.
575
 * non-recursive function to display directory tree.
Line 633... Line 633...
633
       corresponding to mount points) may not have a current (.) and
633
       corresponding to mount points) may not have a current (.) and
634
       parent (..) entry.  So we can't get attributes for initial
634
       parent (..) entry.  So we can't get attributes for initial
635
       path in above loop from the FindFile call as it may not show up
635
       path in above loop from the FindFile call as it may not show up
636
       (no . entry).  So instead we explicitly get them here.
636
       (no . entry).  So instead we explicitly get them here.
637
    */
637
    */
638
    if (GetFileAttributes(&(ddata->attrib), path) != 0) {
638
    if (_dos_getfileattr(path, &(ddata->attrib)) != 0) {
639
      //printf("ERROR: unable to get file attr, %i\n", GetLastError());
639
      //printf("ERROR: unable to get file attr, %i\n", GetLastError());
640
      ddata->attrib = 0;
640
      ddata->attrib = 0;
641
    }
641
    }
642
 
642
 
643
    /* a curiosity, for showing sum of directories process */
643
    /* a curiosity, for showing sum of directories process */