diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2001-09-22 20:09:56 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2001-09-22 20:09:56 +0000 |
commit | d455f4f7a97251609c503d8f3250fe883d689069 (patch) | |
tree | 51375b2b589a8b4f9112fa173d2beb6da829add6 /lisp/vc-hooks.el | |
parent | eb407e67ebea66276ce9afc26be09093d9f80dfa (diff) | |
download | emacs-d455f4f7a97251609c503d8f3250fe883d689069.tar.gz |
(vc-delete-automatic-version-backups):
Don't fail if the directory doesn't exist.
Diffstat (limited to 'lisp/vc-hooks.el')
-rw-r--r-- | lisp/vc-hooks.el | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index f4d843397e3..5e6eba772cd 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el @@ -5,7 +5,7 @@ ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Andre Spiegel <spiegel@gnu.org> -;; $Id: vc-hooks.el,v 1.131 2000/11/24 16:25:59 spiegel Exp $ +;; $Id: vc-hooks.el,v 1.132 2001/07/11 22:05:01 monnier Exp $ ;; This file is part of GNU Emacs. @@ -482,11 +482,13 @@ a regexp for matching all such backup files, regardless of the version." (defun vc-delete-automatic-version-backups (file) "Delete all existing automatic version backups for FILE." - (mapcar - (lambda (f) - (delete-file f)) - (directory-files (file-name-directory file) t - (vc-version-backup-file-name file nil nil t)))) + (condition-case nil + (mapcar + 'delete-file + (directory-files (file-name-directory file) t + (vc-version-backup-file-name file nil nil t))) + ;; Don't fail when the directory doesn't exist. + (file-error nil))) (defun vc-make-version-backup (file) "Make a backup copy of FILE, which is assumed in sync with the repository. |