diff options
Diffstat (limited to 'src/dired.c')
-rw-r--r-- | src/dired.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dired.c b/src/dired.c index 4994241c2cf..f3f13534a87 100644 --- a/src/dired.c +++ b/src/dired.c @@ -27,6 +27,7 @@ Boston, MA 02111-1307, USA. */ #include <sys/stat.h> #include "systime.h" +#include <errno.h> #ifdef VMS #include <string.h> @@ -208,6 +209,7 @@ directory_files_internal (directory, full, match, nosort, attrs) #endif /* not VMS */ /* Loop reading blocks until EOF or error. */ + errno = 0; while ((dp = readdir (d)) != NULL) { if (DIRENTRY_NONEMPTY (dp)) |