aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/url/ChangeLog5
-rw-r--r--lisp/url/url-handlers.el15
2 files changed, 15 insertions, 5 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 784e8d5c320..11f99ec5280 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,8 @@
12008-02-06 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * url-handlers.el (url-handler-unhandled-file-name-directory):
4 Handle `file' URLs specially. Return nil for non-local filenames.
5
12008-02-04 Magnus Henoch <mange@freemail.hu> 62008-02-04 Magnus Henoch <mange@freemail.hu>
2 7
3 * url-expand.el: Require cl when compiling, for setf. 8 * url-expand.el: Require cl when compiling, for setf.
diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el
index acc85b939a1..088e7a6a534 100644
--- a/lisp/url/url-handlers.el
+++ b/lisp/url/url-handlers.el
@@ -183,11 +183,16 @@ the arguments that would have been passed to OPERATION."
183 (url-run-real-handler 'directory-file-name (list dir)))) 183 (url-run-real-handler 'directory-file-name (list dir))))
184 184
185(defun url-handler-unhandled-file-name-directory (filename) 185(defun url-handler-unhandled-file-name-directory (filename)
186 ;; Copied from tramp.el. This is used as the cwd for subprocesses: 186 (let ((url (url-generic-parse-url filename)))
187 ;; without it running call-process or start-process in a URL directory 187 (if (equal (url-type url) "file")
188 ;; signals an error. 188 ;; `file' URLs are actually local. The filename part may be ""
189 ;; FIXME: we can do better if `filename' is a "file://" URL. 189 ;; which really stands for "/".
190 (expand-file-name "~/")) 190 ;; FIXME: maybe we should check that the host part is "" or "localhost"
191 ;; or some name that represents the local host?
192 (or (file-name-directory (url-filename url)) "/")
193 ;; All other URLs are not expected to be directly accessible from
194 ;; a local process.
195 nil)))
191 196
192;; The actual implementation 197;; The actual implementation
193;;;###autoload 198;;;###autoload