Commit bd5795e0 authored by Basil L. Contovounesios's avatar Basil L. Contovounesios
Browse files

Fix url-copy-file arglist

* lisp/url/url-handlers.el: Silence byte-compiler.
(url-copy-file): Add 6th argument following change to copy-file in
2012-12-16T19:22:27+01:00! (bug#4410)
parent eaa188a6
Pipeline #1026 passed with stage
in 28 minutes and 56 seconds
......@@ -41,6 +41,9 @@
(declare-function mm-decode-string "mm-bodies" (string charset))
;; mm-decode loads mail-parse.
(declare-function mail-content-type-get "mail-parse" (ct attribute))
;; mm-bodies loads mm-util.
(declare-function mm-charset-to-coding-system "mm-util"
(charset &optional lbt allow-override silent))
;; Implementation status
;; ---------------------
......@@ -250,15 +253,15 @@ the arguments that would have been passed to OPERATION."
;; The actual implementation
(defun url-copy-file (url newname &optional ok-if-already-exists
_keep-time _preserve-uid-gid)
_keep-time _preserve-uid-gid _preserve-permissions)
"Copy URL to NEWNAME. Both args must be strings.
Signals a `file-already-exists' error if file NEWNAME already exists,
Signal a `file-already-exists' error if file NEWNAME already exists,
unless a third argument OK-IF-ALREADY-EXISTS is supplied and non-nil.
A number as third arg means request confirmation if NEWNAME already exists.
This is what happens in interactive use with M-x.
Fourth arg KEEP-TIME non-nil means give the new file the same
last-modified time as the old one. (This works on only some systems.)
Fifth arg PRESERVE-UID-GID is ignored.
A prefix arg makes KEEP-TIME non-nil."
(if (and (file-exists-p newname)
(not ok-if-already-exists))
......@@ -341,7 +344,7 @@ if it had been inserted from a file named URL."
(unless buffer (signal 'file-error (list url "No Data")))
(with-current-buffer buffer
;; XXX: This is HTTP/S specific and should be moved to url-http
;; instead. See
;; instead. See bug#17549.
(when (bound-and-true-p url-http-response-status)
;; Don't signal an error if VISIT is non-nil, because
;; 'insert-file-contents' doesn't. This is required to
......@@ -354,7 +357,7 @@ if it had been inserted from a file named URL."
(< url-http-response-status 300)))
(let ((desc (nth 2 (assq url-http-response-status url-http-codes))))
(kill-buffer buffer)
;; Signal file-error per
;; Signal file-error per bug#16733.
(signal 'file-error (list url desc))))))
(url-insert-buffer-contents buffer url visit beg end replace)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment