]> git.eshelyaron.com Git - emacs.git/commitdiff
Handle symbolic links properly in Tramp gfvs methods
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 12 Aug 2019 14:18:17 +0000 (16:18 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 12 Aug 2019 14:18:17 +0000 (16:18 +0200)
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-readable-p):
Handle symbolic links.

lisp/net/tramp-gvfs.el

index f10476a7bc65d607c6e451208730180f5fecaa70..b9b6b4b6d188626049b9dc29b698f2182936e333 100644 (file)
@@ -1261,6 +1261,12 @@ file-notify events."
     (with-tramp-file-property v localname "file-readable-p"
       (and (file-exists-p filename)
           (or (tramp-check-cached-permissions v ?r)
+              ;; `tramp-check-cached-permissions' doesn't handle
+              ;; symbolic links.
+              (and (stringp (file-symlink-p filename))
+                   (file-readable-p
+                    (concat
+                     (file-remote-p filename) (file-symlink-p filename))))
               ;; If the user is different from what we guess to be
               ;; the user, we don't know.  Let's check, whether
               ;; access is restricted explicitly.