(unhandled-file-name-directory): Add handler.
(url-handler-unhandled-file-name-directory): New fun.
This commit is contained in:
parent
482cfc3a95
commit
ce4059eea0
2 changed files with 13 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-01-21 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* url-handlers.el (unhandled-file-name-directory): Add handler.
|
||||
(url-handler-unhandled-file-name-directory): New fun.
|
||||
|
||||
2008-01-07 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* url-handlers.el (url-file-handler): Autoload.
|
||||
|
|
|
@ -153,6 +153,7 @@ the arguments that would have been passed to OPERATION."
|
|||
(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!!!)
|
||||
|
@ -184,6 +185,13 @@ the arguments that would have been passed to OPERATION."
|
|||
(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)
|
||||
|
|
Loading…
Add table
Reference in a new issue