In ls.c, errno should be checked after a NULL result from readdir, to see if there was an error. It may be that in a "normal" posix system, no error can happen here, but my NAS box (an EMC Celerra) is reporting EACCES here, so a defensive check, rather than ignoring the error, would be helpful.
I suppose this applies to all readdir's. Regards, Mike while ((next = readdir (reading)) != NULL) if (file_interesting (next)) { enum filetype type = unknown; #if HAVE_STRUCT_DIRENT_D_TYPE if (next->d_type == DT_DIR || next->d_type == DT_CHR || next->d_type == DT_BLK || next->d_type == DT_SOCK || next->d_type == DT_FIFO) type = next->d_type; #endif total_blocks += gobble_file (next->d_name, type, 0, name); } if (CLOSEDIR (reading)) { error (0, errno, "%s", quotearg_colon (name)); exit_status = 1; /* Don't return; print whatever we got. */ } _______________________________________________ Bug-fileutils mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-fileutils