Changeset 5447:f72fce68ca19 for lib.c
Legend:
- Unmodified
- Added
- Removed
-
lib.c
r5438 r5447 42 42 #include <fcntl.h> 43 43 #include <pwd.h> 44 #include <sys/types.h> 44 45 #include <dirent.h> 45 46 … … 584 585 struct dirent* de; 585 586 char cur[_POSIX_PATH_MAX]; 587 struct stat statbuf; 586 588 int rc = 0; 587 589 … … 598 600 snprintf (cur, sizeof (cur), "%s/%s", path, de->d_name); 599 601 /* XXX make nonrecursive version */ 600 if (de->d_type == DT_DIR) 602 603 if (stat(cur, &statbuf) == -1) 604 { 605 rc = 1; 606 continue; 607 } 608 609 if (S_ISDIR (statbuf.st_mode)) 601 610 rc |= mutt_rmtree (cur); 602 611 else
