1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-04 11:40:22 +00:00

Avoid interpreting file:/foo:/bar URLs via tramp.

This commit is contained in:
Lars Magne Ingebrigtsen 2010-11-16 14:46:12 +01:00
parent d2762c8641
commit 023ec128fd
2 changed files with 18 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2010-11-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
* url-file.el (url-file-build-filename): Avoid interpreting
file:/foo:/bar URLs via tramp.
2010-10-14 Lars Magne Ingebrigtsen <larsi@gnus.org> 2010-10-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
* url-gw.el (url-open-stream): Use open-gnutls-stream if it exists. * url-gw.el (url-open-stream): Use open-gnutls-stream if it exists.

View File

@ -103,12 +103,19 @@ to them."
(format "%s#%d" host port)) (format "%s#%d" host port))
host)) host))
(file (url-unhex-string (url-filename url))) (file (url-unhex-string (url-filename url)))
(filename (if (or user (not (url-file-host-is-local-p host))) (filename (cond
(concat "/" (or user "anonymous") "@" site ":" file) ;; ftp: URL.
(if (and (memq system-type '(ms-dos windows-nt)) ((or user (not (url-file-host-is-local-p host)))
(string-match "^/[a-zA-Z]:/" file)) (concat "/" (or user "anonymous") "@" site ":" file))
(substring file 1) ;; file: URL on Windows.
file))) ((and (string-match "\\`/[a-zA-Z]:/" file)
(memq system-type '(ms-dos windows-nt)))
(substring file 1))
;; file: URL with a file:/bar:/foo-like spec.
((string-match "\\`/[^/]+:/" file)
(concat "/:" file))
(t
file)))
pos-index) pos-index)
(and user pass (and user pass