diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index 90e5ebf215..61e22a47af 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -353,7 +353,8 @@ files-tests--with-temp-file (declare (indent 1) (debug ((symbolp symbolp &optional form) body))) (cl-check-type name symbol) (cl-check-type non-special-name symbol) - `(let* ((,name (make-temp-file "files-tests" ,dir-flag)) + `(let* ((temporary-file-directory (file-truename temporary-file-directory)) + (,name (make-temp-file "files-tests" ,dir-flag)) (,non-special-name (file-name-quote ,name))) (unwind-protect (progn ,@body)