break;
}
NavDialogDispose(dialogRef);
+ UNBLOCK_INPUT;
}
else {
+ UNBLOCK_INPUT;
/* Fall back on minibuffer if there was a problem */
file = Fcompleting_read (prompt, intern ("read-file-name-internal"),
dir, mustmatch, dir, Qfile_name_history,
default_filename, Qnil);
}
- UNBLOCK_INPUT;
}
UNGCPRO;
{
OPENFILENAME file_details;
+ BOOL file_opened = FALSE;
/* Prevent redisplay. */
specbind (Qinhibit_redisplay, Qt);
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)
dir, mustmatch, dir, Qfile_name_history,
default_filename, Qnil);
- UNBLOCK_INPUT;
file = unbind_to (count, file);
}