This bugfix gets rid of "File ... no longer exists!" errors in magit-revert-buffers

by checking to make sure that the file exists and is readable before trying to revert.
This commit is contained in:
Aaron Culich 2010-10-12 02:45:25 -07:00 committed by Phil Jackson
parent a4d3e536f1
commit 62d3e95805

View file

@ -1974,6 +1974,7 @@ Please see the manual for a complete description of Magit.
(dolist (buffer (buffer-list))
(when (and buffer
(buffer-file-name buffer)
(file-readable-p (buffer-file-name buffer))
(magit-string-has-prefix-p (buffer-file-name buffer) dir)
(or ignore-modtime (not (verify-visited-file-modtime buffer)))
(not (buffer-modified-p buffer)))