summaryrefslogtreecommitdiff
path: root/src/dired.c
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2006-08-27 07:08:39 +0000
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2006-08-27 07:08:39 +0000
commitbc2f50d847a3df620536060aab9bd6a5ec7a3e5b (patch)
treef2a42aaa1bdd6fdad442c0fd3f50d5cacbb5edee /src/dired.c
parentc6757bcaeed5c3d1173baf89be17330fa26b8900 (diff)
downloademacs-bc2f50d847a3df620536060aab9bd6a5ec7a3e5b.tar.gz
(directory_files_internal_unwind, directory_files_internal)
(file_name_completion): Add BLOCK_INPUT around opendir/closedir.
Diffstat (limited to 'src/dired.c')
-rw-r--r--src/dired.c8
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)
Lisp_Object dh;
{
DIR *d = (DIR *) XSAVE_VALUE (dh)->pointer;
+ BLOCK_INPUT;
closedir (d);
+ UNBLOCK_INPUT;
return Qnil;
}
@@ -196,7 +198,9 @@ directory_files_internal (directory, full, match, nosort, attrs, id_format)
/* Now *bufp is the compiled form of MATCH; don't call anything
which might compile a new regexp until we're done with the loop! */
+ BLOCK_INPUT;
d = opendir (SDATA (dirfilename));
+ UNBLOCK_INPUT;
if (d == NULL)
report_file_error ("Opening directory", Fcons (directory, Qnil));
@@ -321,7 +325,9 @@ directory_files_internal (directory, full, match, nosort, attrs, id_format)
}
}
+ BLOCK_INPUT;
closedir (d);
+ UNBLOCK_INPUT;
/* Discard the unwind protect. */
specpdl_ptr = specpdl + count;
@@ -508,7 +514,9 @@ file_name_completion (file, dirname, all_flag, ver_flag)
{
int inner_count = SPECPDL_INDEX ();
+ BLOCK_INPUT;
d = opendir (SDATA (Fdirectory_file_name (encoded_dir)));
+ UNBLOCK_INPUT;
if (!d)
report_file_error ("Opening directory", Fcons (dirname, Qnil));