diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el index d66a9caedd3..6dd4bb91bc2 100644 --- a/test/lisp/dired-tests.el +++ b/test/lisp/dired-tests.el @@ -38,6 +38,8 @@ (full-name (expand-file-name file dir)) (regexp "bar") (dired-always-read-filesystem t)) + (if (file-exists-p dir) + (delete-directory dir 'recursive)) (make-directory dir) (with-temp-file full-name (insert "foo")) (find-file-noselect full-name)