[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master c7f141d678: Make url-tramp-convert-tramp-to-url more robust
From: |
Michael Albinus |
Subject: |
master c7f141d678: Make url-tramp-convert-tramp-to-url more robust |
Date: |
Fri, 24 Jun 2022 12:06:08 -0400 (EDT) |
branch: master
commit c7f141d67829ccef64a5e4e961f098f09774afe2
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>
Make url-tramp-convert-tramp-to-url more robust
* lisp/url/url-tramp.el (url-tramp-convert-tramp-to-url):
Prevent errors from not existing Tramp methods.
---
lisp/url/url-tramp.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/url/url-tramp.el b/lisp/url/url-tramp.el
index 2918192a45..c414a025a1 100644
--- a/lisp/url/url-tramp.el
+++ b/lisp/url/url-tramp.el
@@ -62,7 +62,8 @@ In case URL is not convertible, nil is returned."
(defun url-tramp-convert-tramp-to-url (file)
"Convert FILE, a Tramp file name, to a URL.
In case FILE is not convertible, nil is returned."
- (let* ((obj (and (tramp-tramp-file-p file) (tramp-dissect-file-name file)))
+ (let* ((obj (and (tramp-tramp-file-p file)
+ (ignore-errors (tramp-dissect-file-name file))))
(port
(and obj (stringp (tramp-file-name-port obj))
(string-to-number (tramp-file-name-port obj)))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master c7f141d678: Make url-tramp-convert-tramp-to-url more robust,
Michael Albinus <=