diff options
| author | Jason Rumney | 2009-02-21 07:53:54 +0000 |
|---|---|---|
| committer | Jason Rumney | 2009-02-21 07:53:54 +0000 |
| commit | 5ca454075e54e84a574831b9ca4e0d087ab6987d (patch) | |
| tree | 5efe7f09bf9ecf4660b57adcf8a7ea372a689dd5 | |
| parent | ba32b5d2fc18e11fb8e65fbe1c04d721471074ad (diff) | |
| download | emacs-5ca454075e54e84a574831b9ca4e0d087ab6987d.tar.gz emacs-5ca454075e54e84a574831b9ca4e0d087ab6987d.zip | |
(url-default-expander): Use concat to combine parts. (Bug #1020)
| -rw-r--r-- | lisp/url/url-expand.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/url/url-expand.el b/lisp/url/url-expand.el index 14dafbdc2da..d37b0b2223a 100644 --- a/lisp/url/url-expand.el +++ b/lisp/url/url-expand.el | |||
| @@ -134,9 +134,11 @@ path components followed by `..' are removed, along with the `..' itself." | |||
| 134 | file (substring (url-filename urlobj) 0 (match-beginning 0)) | 134 | file (substring (url-filename urlobj) 0 (match-beginning 0)) |
| 135 | sepchar (substring (url-filename urlobj) (match-beginning 0) (match-end 0))) | 135 | sepchar (substring (url-filename urlobj) (match-beginning 0) (match-end 0))) |
| 136 | (setq file (url-filename urlobj))) | 136 | (setq file (url-filename urlobj))) |
| 137 | ;; We use concat rather than expand-file-name to combine | ||
| 138 | ;; directory and file name, since urls do not follow the same | ||
| 139 | ;; rules as local files on all platforms. | ||
| 137 | (setq file (url-expander-remove-relative-links | 140 | (setq file (url-expander-remove-relative-links |
| 138 | (expand-file-name file | 141 | (concat (url-file-directory (url-filename defobj)) file))) |
| 139 | (url-file-directory (url-filename defobj))))) | ||
| 140 | (setf (url-filename urlobj) | 142 | (setf (url-filename urlobj) |
| 141 | (if query (concat file sepchar query) file)))))) | 143 | (if query (concat file sepchar query) file)))))) |
| 142 | 144 | ||