summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-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 @@
+2012-08-12 David Engster <deng@randomsample.de>
+
+ * url-util.el (url-file-directory, url-file-nondirectory): Avoid
+ file-name-directory and file-name-nondirectory internally (bug#11981).
+
2012-08-11 Jason Rumney <jasonr@gnu.org>
* url-http.el (url-http-create-request): Use url-http-proxy to
@@ -5,7 +10,7 @@
2012-07-28 David Engster <deng@randomsample.de>
- * url-dav.el (url-dav-supported-p): Added doc-string and remove
+ * url-dav.el (url-dav-supported-p): Add doc-string and remove
check for feature `xml' and function `xml-expand-namespace' which
never existed in Emacs proper.
(url-dav-process-response): Remove all indentation and newlines
@@ -63,8 +68,8 @@
2012-05-10 Chong Yidong <cyd@gnu.org>
- * url-parse.el (url-path-and-query, url-port-if-non-default): New
- functions.
+ * url-parse.el (url-path-and-query, url-port-if-non-default):
+ New functions.
(url-generic-parse-url): Don't set the portspec slot if it is not
specified; that is what `url-port' is for.
(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."
(cond
((null file) "")
((string-match "\\?" file)
- (file-name-directory (substring file 0 (match-beginning 0))))
- (t (file-name-directory file))))
+ (url-file-directory (substring file 0 (match-beginning 0))))
+ ((string-match "\\(.*\\(/\\|%2[fF]\\)\\)" file)
+ (match-string 1 file))))
;;;###autoload
(defun url-file-nondirectory (file)
@@ -256,8 +257,10 @@ Will not do anything if `url-show-status' is nil."
(cond
((null file) "")
((string-match "\\?" file)
- (file-name-nondirectory (substring file 0 (match-beginning 0))))
- (t (file-name-nondirectory file))))
+ (url-file-nondirectory (substring file 0 (match-beginning 0))))
+ ((string-match ".*\\(?:/\\|%2[fF]\\)\\(.*\\)" file)
+ (match-string 1 file))
+ (t file)))
;;;###autoload
(defun url-parse-query-string (query &optional downcase allow-newlines)