[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master e59e7278924: * lisp/net/tramp-gvfs.el (tramp-gvfs-local-file-name
From: |
Michael Albinus |
Subject: |
master e59e7278924: * lisp/net/tramp-gvfs.el (tramp-gvfs-local-file-name): New defun. |
Date: |
Sat, 21 Dec 2024 12:12:59 -0500 (EST) |
branch: master
commit e59e7278924cd0dca49d4333dba188530721f5a3
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>
* lisp/net/tramp-gvfs.el (tramp-gvfs-local-file-name): New defun.
---
lisp/net/tramp-gvfs.el | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 683f8cc12bd..f96581c1510 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -1772,6 +1772,24 @@ a downcased host name only."
(string-match (rx bol (+ alnum) "://" (group (+ (not (any "/:"))))) url)
(match-string 1 url)))
+;; This is used in GNU ELPA package tramp-locproc.el.
+(defun tramp-gvfs-local-file-name (filename)
+ "Return local mount name of FILENAME."
+ (setq filename (file-name-unquote (expand-file-name filename)))
+ (with-parsed-tramp-file-name filename nil
+ (with-tramp-file-property v localname "local-file-name"
+ ;; As long as we call `tramp-gvfs-maybe-open-connection' here,
+ ;; we cache the result.
+ (tramp-gvfs-maybe-open-connection v)
+ (let ((quoted (file-name-quoted-p localname))
+ (localname (file-name-unquote localname)))
+ (funcall
+ (if quoted #'file-name-quote #'identity)
+ (expand-file-name
+ (if (file-name-absolute-p localname)
+ (substring localname 1) localname)
+ (tramp-get-file-property v "/" "fuse-mountpoint")))))))
+
;; D-Bus GVFS functions.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master e59e7278924: * lisp/net/tramp-gvfs.el (tramp-gvfs-local-file-name): New defun.,
Michael Albinus <=