diff options
Diffstat (limited to 'src/dired.c')
| -rw-r--r-- | src/dired.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/dired.c b/src/dired.c index f6c47a71400..43cb8373a6d 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -251,14 +251,9 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full, | |||
| 251 | /* The MS-Windows implementation of 'opendir' doesn't | 251 | /* The MS-Windows implementation of 'opendir' doesn't |
| 252 | actually open a directory until the first call to | 252 | actually open a directory until the first call to |
| 253 | 'readdir'. If 'readdir' fails to open the directory, it | 253 | 'readdir'. If 'readdir' fails to open the directory, it |
| 254 | sets errno to ENOTDIR; we convert it here to ENOENT so | 254 | sets errno to ENOENT or EACCES, see w32.c. */ |
| 255 | that the error message is similar to what happens on | 255 | if (errno) |
| 256 | Posix hosts in such cases. */ | 256 | report_file_error ("Opening directory", directory); |
| 257 | if (errno == ENOTDIR) | ||
| 258 | { | ||
| 259 | errno = ENOENT; | ||
| 260 | report_file_error ("Opening directory", directory); | ||
| 261 | } | ||
| 262 | #endif | 257 | #endif |
| 263 | break; | 258 | break; |
| 264 | } | 259 | } |
| @@ -530,6 +525,10 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, bool all_flag, | |||
| 530 | QUIT; | 525 | QUIT; |
| 531 | continue; | 526 | continue; |
| 532 | } | 527 | } |
| 528 | #ifdef WINDOWSNT | ||
| 529 | if (errno) | ||
| 530 | report_file_error ("Opening directory", dirname); | ||
| 531 | #endif | ||
| 533 | break; | 532 | break; |
| 534 | } | 533 | } |
| 535 | 534 | ||