aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Engster2012-08-12 13:35:15 -0400
committerStefan Monnier2012-08-12 13:35:15 -0400
commit577d5eea9a7b6f0cfdf7fafb6d2fdc82e4d702a7 (patch)
treed8146f77ca080d60b6f7b98578f2ceb077bd4dc1
parentba10c48cc64dbe9daf5561bf4920fb0e384cc21e (diff)
downloademacs-577d5eea9a7b6f0cfdf7fafb6d2fdc82e4d702a7.tar.gz
emacs-577d5eea9a7b6f0cfdf7fafb6d2fdc82e4d702a7.zip
* lisp/url/url-util.el (url-file-directory, url-file-nondirectory): Avoid
file-name-directory and file-name-nondirectory internally. Fixes: debbugs:11981
-rw-r--r--lisp/url/ChangeLog11
-rw-r--r--lisp/url/url-util.el11
2 files changed, 15 insertions, 7 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 766e45a12e2..815af4e6d43 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,8 @@
12012-08-12 David Engster <deng@randomsample.de>
2
3 * url-util.el (url-file-directory, url-file-nondirectory): Avoid
4 file-name-directory and file-name-nondirectory internally (bug#11981).
5
12012-08-11 Jason Rumney <jasonr@gnu.org> 62012-08-11 Jason Rumney <jasonr@gnu.org>
2 7
3 * url-http.el (url-http-create-request): Use url-http-proxy to 8 * url-http.el (url-http-create-request): Use url-http-proxy to
@@ -5,7 +10,7 @@
5 10
62012-07-28 David Engster <deng@randomsample.de> 112012-07-28 David Engster <deng@randomsample.de>
7 12
8 * url-dav.el (url-dav-supported-p): Added doc-string and remove 13 * url-dav.el (url-dav-supported-p): Add doc-string and remove
9 check for feature `xml' and function `xml-expand-namespace' which 14 check for feature `xml' and function `xml-expand-namespace' which
10 never existed in Emacs proper. 15 never existed in Emacs proper.
11 (url-dav-process-response): Remove all indentation and newlines 16 (url-dav-process-response): Remove all indentation and newlines
@@ -63,8 +68,8 @@
63 68
642012-05-10 Chong Yidong <cyd@gnu.org> 692012-05-10 Chong Yidong <cyd@gnu.org>
65 70
66 * url-parse.el (url-path-and-query, url-port-if-non-default): New 71 * url-parse.el (url-path-and-query, url-port-if-non-default):
67 functions. 72 New functions.
68 (url-generic-parse-url): Don't set the portspec slot if it is not 73 (url-generic-parse-url): Don't set the portspec slot if it is not
69 specified; that is what `url-port' is for. 74 specified; that is what `url-port' is for.
70 (url-port): Only require the scheme to be specified to call 75 (url-port): Only require the scheme to be specified to call
diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el
index 2faca26f2dd..f654830e387 100644
--- a/lisp/url/url-util.el
+++ b/lisp/url/url-util.el
@@ -247,8 +247,9 @@ Will not do anything if `url-show-status' is nil."
247 (cond 247 (cond
248 ((null file) "") 248 ((null file) "")
249 ((string-match "\\?" file) 249 ((string-match "\\?" file)
250 (file-name-directory (substring file 0 (match-beginning 0)))) 250 (url-file-directory (substring file 0 (match-beginning 0))))
251 (t (file-name-directory file)))) 251 ((string-match "\\(.*\\(/\\|%2[fF]\\)\\)" file)
252 (match-string 1 file))))
252 253
253;;;###autoload 254;;;###autoload
254(defun url-file-nondirectory (file) 255(defun url-file-nondirectory (file)
@@ -256,8 +257,10 @@ Will not do anything if `url-show-status' is nil."
256 (cond 257 (cond
257 ((null file) "") 258 ((null file) "")
258 ((string-match "\\?" file) 259 ((string-match "\\?" file)
259 (file-name-nondirectory (substring file 0 (match-beginning 0)))) 260 (url-file-nondirectory (substring file 0 (match-beginning 0))))
260 (t (file-name-nondirectory file)))) 261 ((string-match ".*\\(?:/\\|%2[fF]\\)\\(.*\\)" file)
262 (match-string 1 file))
263 (t file)))
261 264
262;;;###autoload 265;;;###autoload
263(defun url-parse-query-string (query &optional downcase allow-newlines) 266(defun url-parse-query-string (query &optional downcase allow-newlines)