* lisp/files.el (get-free-disk-space): Wrap body with `save-match-data'.

Several `*-insert-directory' functions could fail otherwise.
This commit is contained in:
Michael Albinus 2018-02-01 08:53:08 +01:00
parent f692deb7dd
commit d42bd3a512

View file

@ -6473,9 +6473,10 @@ The return value is a string describing the amount of free
space (normally, the number of free 1KB blocks).
If DIR's free space cannot be obtained, this function returns nil."
(let ((avail (nth 2 (file-system-info dir))))
(if avail
(format "%.0f" (/ avail 1024)))))
(save-match-data
(let ((avail (nth 2 (file-system-info dir))))
(if avail
(format "%.0f" (/ avail 1024))))))
;; The following expression replaces `dired-move-to-filename-regexp'.
(defvar directory-listing-before-filename-regexp