diff options
Diffstat (limited to 'src/dired.c')
| -rw-r--r-- | src/dired.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dired.c b/src/dired.c index 17a80a3ce4b..b469d682c41 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -134,7 +134,9 @@ directory_files_internal_unwind (dh) | |||
| 134 | Lisp_Object dh; | 134 | Lisp_Object dh; |
| 135 | { | 135 | { |
| 136 | DIR *d = (DIR *) XSAVE_VALUE (dh)->pointer; | 136 | DIR *d = (DIR *) XSAVE_VALUE (dh)->pointer; |
| 137 | BLOCK_INPUT; | ||
| 137 | closedir (d); | 138 | closedir (d); |
| 139 | UNBLOCK_INPUT; | ||
| 138 | return Qnil; | 140 | return Qnil; |
| 139 | } | 141 | } |
| 140 | 142 | ||
| @@ -196,7 +198,9 @@ directory_files_internal (directory, full, match, nosort, attrs, id_format) | |||
| 196 | /* Now *bufp is the compiled form of MATCH; don't call anything | 198 | /* Now *bufp is the compiled form of MATCH; don't call anything |
| 197 | which might compile a new regexp until we're done with the loop! */ | 199 | which might compile a new regexp until we're done with the loop! */ |
| 198 | 200 | ||
| 201 | BLOCK_INPUT; | ||
| 199 | d = opendir (SDATA (dirfilename)); | 202 | d = opendir (SDATA (dirfilename)); |
| 203 | UNBLOCK_INPUT; | ||
| 200 | if (d == NULL) | 204 | if (d == NULL) |
| 201 | report_file_error ("Opening directory", Fcons (directory, Qnil)); | 205 | report_file_error ("Opening directory", Fcons (directory, Qnil)); |
| 202 | 206 | ||
| @@ -321,7 +325,9 @@ directory_files_internal (directory, full, match, nosort, attrs, id_format) | |||
| 321 | } | 325 | } |
| 322 | } | 326 | } |
| 323 | 327 | ||
| 328 | BLOCK_INPUT; | ||
| 324 | closedir (d); | 329 | closedir (d); |
| 330 | UNBLOCK_INPUT; | ||
| 325 | 331 | ||
| 326 | /* Discard the unwind protect. */ | 332 | /* Discard the unwind protect. */ |
| 327 | specpdl_ptr = specpdl + count; | 333 | specpdl_ptr = specpdl + count; |
| @@ -508,7 +514,9 @@ file_name_completion (file, dirname, all_flag, ver_flag) | |||
| 508 | { | 514 | { |
| 509 | int inner_count = SPECPDL_INDEX (); | 515 | int inner_count = SPECPDL_INDEX (); |
| 510 | 516 | ||
| 517 | BLOCK_INPUT; | ||
| 511 | d = opendir (SDATA (Fdirectory_file_name (encoded_dir))); | 518 | d = opendir (SDATA (Fdirectory_file_name (encoded_dir))); |
| 519 | UNBLOCK_INPUT; | ||
| 512 | if (!d) | 520 | if (!d) |
| 513 | report_file_error ("Opening directory", Fcons (dirname, Qnil)); | 521 | report_file_error ("Opening directory", Fcons (dirname, Qnil)); |
| 514 | 522 | ||