Fix backtrace when query-about-changed-file nil and file has changed
* lisp/userlock.el (userlock--check-content-unchanged): Make the assertion more robust -- we may be called here from a different contexts if `query-about-changed-file' is nil.
This commit is contained in:
parent
8567ec8bcf
commit
cc5b6cb6bc
1 changed files with 2 additions and 1 deletions
|
@ -125,7 +125,8 @@ You can <%s>uit; don't modify this file."
|
|||
(with-demoted-errors "Unchanged content check: %S"
|
||||
;; Even tho we receive `filename', we know that `filename' refers to the current
|
||||
;; buffer's file.
|
||||
(cl-assert (equal filename (expand-file-name buffer-file-truename)))
|
||||
(cl-assert (equal (expand-file-name filename)
|
||||
(expand-file-name buffer-file-truename)))
|
||||
;; Note: rather than read the file and compare to the buffer, we could save
|
||||
;; the buffer and compare to the file, but for encrypted data this
|
||||
;; wouldn't work well (and would risk exposing the data).
|
||||
|
|
Loading…
Add table
Reference in a new issue