From 27707243715eef8de068908a5a9b5a8473dac848 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Spiegel?= Date: Mon, 7 Feb 2005 20:38:46 +0000 Subject: [PATCH] (vc-make-version-backup): Ignore file-errors, e.g. directory not writable. --- lisp/vc-hooks.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 2dc8e1533f0..bdff9fbe12c 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el @@ -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)." -- 2.39.5