]> git.eshelyaron.com Git - emacs.git/commitdiff
Support existing sshfs and rclone mount points in Tramp
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 22 May 2023 14:08:23 +0000 (16:08 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 22 May 2023 14:08:23 +0000 (16:08 +0200)
* lisp/net/tramp-fuse.el (tramp-fuse-mount-point, tramp-fuse-mounted-p):
Support existing mount points.

lisp/net/tramp-fuse.el

index 8112e564a2c308fd4ff504856fbfcc28c8c99638..5c0bb8e8d96ed8c4df3a806e79f62a608797297b 100644 (file)
 
 (defun tramp-fuse-mount-point (vec)
   "Return local mount point of VEC."
-  (or (tramp-get-connection-property vec "mount-point")
+  (or (tramp-get-file-property vec "/" "mount-point")
       (expand-file-name
        (concat
        tramp-temp-name-prefix
@@ -173,8 +173,11 @@ It has the same meaning as `remote-file-name-inhibit-cache'.")
           (tramp-set-file-property
           vec "/" "mounted"
            (when (string-match
-                 (rx bol (group (literal (tramp-fuse-mount-spec vec))) blank)
+                 (rx bol (group (literal (tramp-fuse-mount-spec vec)))
+                     " on " (group (+ (not blank))) blank)
                  mount)
+            (tramp-set-file-property
+             vec "/" "mount-point" (match-string 2 mount))
              (match-string 1 mount)))))))
 
 (defun tramp-fuse-get-fusermount ()