diff --git a/lisp/tramp.el b/lisp/tramp.el index 351def66..f5208cd9 100644 --- a/lisp/tramp.el +++ b/lisp/tramp.el @@ -4039,7 +4039,10 @@ Let-bind it when necessary.") ;; Sometimes, `file-attributes' does not return a proper value ;; even if `file-exists-p' does. (when-let ((attr (file-attributes filename))) - (eq ?- (aref (file-attribute-modes attr) 0))))) + (cond + ((eq ?- (aref (file-attribute-modes attr) 0))) + ((eq ?l (aref (file-attribute-modes attr) 0)) + (file-regular-p (file-truename filename))))))) (defun tramp-handle-file-remote-p (filename &optional identification connected) "Like `file-remote-p' for Tramp files."