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:
parent
fc34503b56
commit
2770724371
1 changed files with 9 additions and 2 deletions
|
|
@ -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)."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue