diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-06-11 15:55:55 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-06-11 15:55:55 +0000 |
commit | f7ed19a3eea686986704220f2ca7295e2fbf8d44 (patch) | |
tree | 5c83a6e962ef78780264b5c412655f1666de4068 /lisp/vc-rcs.el | |
parent | 32a7e53cb36166c5ee44bed32520966307d62679 (diff) | |
download | emacs-f7ed19a3eea686986704220f2ca7295e2fbf8d44.tar.gz |
(vc-rcs-state-heuristic): Don't assume the file exists.
Diffstat (limited to 'lisp/vc-rcs.el')
-rw-r--r-- | lisp/vc-rcs.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/vc-rcs.el b/lisp/vc-rcs.el index 0bda1e7c6aa..9d0550880ce 100644 --- a/lisp/vc-rcs.el +++ b/lisp/vc-rcs.el @@ -155,7 +155,8 @@ For a description of possible values, see `vc-check-master-templates'." ;; permissions can tell us whether locking is used for ;; the file or not. (if (and (eq state 'up-to-date) - (not (vc-mistrust-permissions file))) + (not (vc-mistrust-permissions file)) + (file-exists-p file)) (cond ((string-match ".rw..-..-." (nth 8 (file-attributes file))) (vc-file-setprop file 'vc-checkout-model 'implicit) @@ -170,10 +171,10 @@ For a description of possible values, see `vc-check-master-templates'." (let* ((attributes (file-attributes file 'string)) (owner-name (nth 2 attributes)) (permissions (nth 8 attributes))) - (cond ((string-match ".r-..-..-." permissions) + (cond ((and permissions (string-match ".r-..-..-." permissions)) (vc-file-setprop file 'vc-checkout-model 'locking) 'up-to-date) - ((string-match ".rw..-..-." permissions) + ((and permissions (string-match ".rw..-..-." permissions)) (if (eq (vc-rcs-checkout-model file) 'locking) (if (file-ownership-preserved-p file) 'edited |