* lisp/files.el (move-file-to-trash): Pass the correct dir-flag to
make-temp-file so that a directory is created when a directory is
being trashed (Bug#47960).
;; Make a .trashinfo file. Use O_EXCL, as per trash-spec 1.0.
(let* ((files-base (file-name-nondirectory fn))
+ (is-directory (file-directory-p fn))
(overwrite nil)
info-fn)
;; We're checking further down whether the info file
files-base (file-name-nondirectory
(make-temp-file
(expand-file-name
- files-base trash-files-dir)))))
+ files-base trash-files-dir)
+ is-directory))))
(setq info-fn (expand-file-name
(concat files-base ".trashinfo")
trash-info-dir))