From 55642aa486ffc855ee84c6c9bdad75942fdec2d6 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 16 Jul 1997 20:55:50 +0000 Subject: [PATCH] (dired-find-file): Better error message for symlink to nonexistent target. --- lisp/dired.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/dired.el b/lisp/dired.el index c4cfc2ea73e..c767b1c6b3e 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1226,7 +1226,9 @@ Creates a buffer if necessary." (let ((file-name (file-name-sans-versions (dired-get-filename) t))) (if (file-exists-p file-name) (find-file file-name) - (error "File no longer exists; type `g' to update Dired buffer")))) + (if (file-symlink-p file-name) + (error "File is a symlink to a nonexistent target") + (error "File no longer exists; type `g' to update Dired buffer"))))) (defun dired-mouse-find-file-other-window (event) "In dired, visit the file or directory name you click on." -- 2.39.2