summaryrefslogtreecommitdiff
path: root/src/w32fns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/w32fns.c')
-rw-r--r--src/w32fns.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index 23297ade5f3..0e9e4509373 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -7808,6 +7808,7 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */)
{
OPENFILENAME file_details;
+ BOOL file_opened = FALSE;
/* Prevent redisplay. */
specbind (Qinhibit_redisplay, Qt);
@@ -7836,7 +7837,11 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */)
file_details.lpfnHook = (LPOFNHOOKPROC) file_dialog_callback;
- if (GetOpenFileName (&file_details))
+ file_opened = GetOpenFileName (&file_details);
+
+ UNBLOCK_INPUT;
+
+ if (file_opened)
{
dostounix_filename (filename);
if (file_details.nFilterIndex == 2)
@@ -7857,7 +7862,6 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */)
dir, mustmatch, dir, Qfile_name_history,
default_filename, Qnil);
- UNBLOCK_INPUT;
file = unbind_to (count, file);
}