[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 06499a6: Make url-tramp more robust
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] master 06499a6: Make url-tramp more robust |
Date: |
Sat, 15 Jun 2019 06:19:08 -0400 (EDT) |
branch: master
commit 06499a6fe60160743eebf4413f99b13d1fd5cff0
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
Make url-tramp more robust
* lisp/url/url-tramp.el (url-tramp-convert-url-to-tramp)
(url-tramp-convert-tramp-to-url): Check, that obj is non-nil.
---
lisp/url/url-tramp.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lisp/url/url-tramp.el b/lisp/url/url-tramp.el
index 305635c..f4ec822 100644
--- a/lisp/url/url-tramp.el
+++ b/lisp/url/url-tramp.el
@@ -42,9 +42,9 @@ If URL contains a password, it will be added to the
`password-data' cache.
In case URL is not convertible, nil is returned."
(let* ((obj (url-generic-parse-url (and (stringp url) url)))
(port
- (and (natnump (url-portspec obj))
+ (and obj (natnump (url-portspec obj))
(number-to-string (url-portspec obj)))))
- (when (member (url-type obj) url-tramp-protocols)
+ (when (and obj (member (url-type obj) url-tramp-protocols))
(when (url-password obj)
(password-cache-add
(tramp-make-tramp-file-name
@@ -60,9 +60,9 @@ In case URL is not convertible, nil is returned."
In case FILE is not convertible, nil is returned."
(let* ((obj (ignore-errors (tramp-dissect-file-name file)))
(port
- (and (stringp (tramp-file-name-port obj))
+ (and obj (stringp (tramp-file-name-port obj))
(string-to-number (tramp-file-name-port obj)))))
- (when (member (tramp-file-name-method obj) url-tramp-protocols)
+ (when (and obj (member (tramp-file-name-method obj) url-tramp-protocols))
(url-recreate-url
(url-parse-make-urlobj
(tramp-file-name-method obj)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 06499a6: Make url-tramp more robust,
Michael Albinus <=