1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

(vc-make-version-backup): Ignore file-errors, e.g. directory not

writable.
This commit is contained in:
André Spiegel 2005-02-07 20:38:46 +00:00
parent fc34503b56
commit 2770724371

View file

@ -632,8 +632,15 @@ Before doing that, check if there are any old backups and get rid of them."
(unless (and (fboundp 'msdos-long-file-names)
(not (with-no-warnings (msdos-long-file-names))))
(vc-delete-automatic-version-backups file)
(copy-file file (vc-version-backup-file-name file)
nil 'keep-date)))
(condition-case nil
(copy-file file (vc-version-backup-file-name file)
nil 'keep-date)
;; It's ok if it doesn't work (e.g. directory not writable),
;; since this is just for efficiency.
(file-error
(message
(concat "Warning: Cannot make version backup; "
"diff/revert therefore not local"))))))
(defun vc-before-save ()
"Function to be called by `basic-save-buffer' (in files.el)."