emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109575: * lisp/url/url-util.el (url-


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109575: * lisp/url/url-util.el (url-file-directory, url-file-nondirectory): Avoid
Date: Sun, 12 Aug 2012 13:35:15 -0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109575
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11981
author: David Engster <address@hidden>
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Sun 2012-08-12 13:35:15 -0400
message:
  * lisp/url/url-util.el (url-file-directory, url-file-nondirectory): Avoid
  file-name-directory and file-name-nondirectory internally.
modified:
  lisp/url/ChangeLog
  lisp/url/url-util.el
=== modified file 'lisp/url/ChangeLog'
--- a/lisp/url/ChangeLog        2012-08-11 14:50:28 +0000
+++ b/lisp/url/ChangeLog        2012-08-12 17:35:15 +0000
@@ -1,3 +1,8 @@
+2012-08-12  David Engster  <address@hidden>
+
+       * 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  <address@hidden>
 
        * url-http.el (url-http-create-request): Use url-http-proxy to
@@ -5,7 +10,7 @@
 
 2012-07-28  David Engster  <address@hidden>
 
-       * 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  <address@hidden>
 
-       * 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

=== modified file 'lisp/url/url-util.el'
--- a/lisp/url/url-util.el      2012-07-11 23:13:41 +0000
+++ b/lisp/url/url-util.el      2012-08-12 17:35:15 +0000
@@ -247,8 +247,9 @@
   (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 @@
   (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)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]