equals -> file-equal-p refactor

Use more reliable file comparison function.
This commit is contained in:
Henrik Lissner 2018-06-07 18:01:06 +02:00
parent ee262e7737
commit 99afb01315
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -49,8 +49,7 @@
(make-directory new-path-dir t)) (make-directory new-path-dir t))
(when (buffer-modified-p) (when (buffer-modified-p)
(save-buffer)) (save-buffer))
(cond ((equal (file-truename old-path) (cond ((file-equal-p old-path new-path)
(file-truename new-path))
(throw 'status 'overwrite-self)) (throw 'status 'overwrite-self))
((and (file-exists-p new-path) ((and (file-exists-p new-path)
(not force-p) (not force-p)