[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/url/url-handlers.el,v
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/url/url-handlers.el,v |
Date: |
Tue, 22 Jan 2008 23:54:18 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Miles Bader <miles> 08/01/22 23:53:46
Index: lisp/url/url-handlers.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/url/url-handlers.el,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- lisp/url/url-handlers.el 8 Jan 2008 20:45:28 -0000 1.24
+++ lisp/url/url-handlers.el 22 Jan 2008 23:53:44 -0000 1.25
@@ -150,6 +150,7 @@
(put 'file-name-absolute-p 'url-file-handlers (lambda (&rest ignored) t))
(put 'expand-file-name 'url-file-handlers 'url-handler-expand-file-name)
(put 'directory-file-name 'url-file-handlers 'url-handler-directory-file-name)
+(put 'unhandled-file-name-directory 'url-file-handlers
'url-handler-unhandled-file-name-directory)
;; (put 'file-name-as-directory 'url-file-handlers
'url-handler-file-name-as-directory)
;; These are operations that we do not support yet (DAV!!!)
@@ -181,6 +182,13 @@
(if (string-match "//\\'" dir) dir
(url-run-real-handler 'directory-file-name (list dir))))
+(defun url-handler-unhandled-file-name-directory (filename)
+ ;; Copied from tramp.el. This is used as the cwd for subprocesses:
+ ;; without it running call-process or start-process in a URL directory
+ ;; signals an error.
+ ;; FIXME: we can do better if `filename' is a "file://" URL.
+ (expand-file-name "~/"))
+
;; The actual implementation
;;;###autoload
(defun url-copy-file (url newname &optional ok-if-already-exists keep-time)