diff options
Diffstat (limited to 'lisp/vc/vc.el')
-rw-r--r-- | lisp/vc/vc.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 2fb397ed6f8..7f55ffdbdad 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1117,7 +1117,10 @@ merge in the changes into your working copy." ;; Make the file+buffer read-write. (unless (y-or-n-p (format "%s is edited but read-only; make it writable and continue? " file)) (error "Aborted")) - (set-file-modes file (logior (file-modes file) 128)) + ;; Maybe we somehow lost permissions on the directory. + (condition-case nil + (set-file-modes file (logior (file-modes file) 128)) + (error (error "Unable to make file writable"))) (let ((visited (get-file-buffer file))) (when visited (with-current-buffer visited |