+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
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
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
(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)
(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)