* lisp/ffi/ffi-curl.el (curl:file-exists-p): Use 'make-temp-name'
instead of 'make-temp-file' which may not be available.
(curl:insert-file-contents-literally): Ditto.
(curl:download): #'expand-file-name on the PREFIX arg of
'make-temp-name' so it attempts to avoid name collision.
Signed-off-by: Steve Youngs <steve@sxemacs.org>
(ffap-url-at-point))
curl:download-history)
(read-file-name "Local file: " default-directory
(ffap-url-at-point))
curl:download-history)
(read-file-name "Local file: " default-directory
- (expand-file-name (make-temp-name "curl:downloaded:")
- (temp-directory)))))
+ (make-temp-name
+ (expand-file-name "curl:downloaded:"
+ (temp-directory)))))
(when current-prefix-arg
;; In case of C-u
(and (y-or-n-p (format "Only download %s's HTTP header? "
(when current-prefix-arg
;; In case of C-u
(and (y-or-n-p (format "Only download %s's HTTP header? "
(ffap-url-at-point))
curl:download-history)
(read-file-name "Local file: " default-directory
(ffap-url-at-point))
curl:download-history)
(read-file-name "Local file: " default-directory
- (expand-file-name (make-temp-name "curl:downloaded:")
- (temp-directory)))))
+ (make-temp-name
+ (expand-file-name "curl:downloaded:"
+ (temp-directory))))))
(when current-prefix-arg
(and (y-or-n-p (format "Only download %s's HTTP header? "
(file-basename file-or-buffer)))
(when current-prefix-arg
(and (y-or-n-p (format "Only download %s's HTTP header? "
(file-basename file-or-buffer)))
Currently only HTTP and FTP are supported, and then only if the URL ends
in a filename. IOW you can't do \(file-exists-p \"http://example.com/\"\)"
Currently only HTTP and FTP are supported, and then only if the URL ends
in a filename. IOW you can't do \(file-exists-p \"http://example.com/\"\)"
- (let ((lfile (expand-file-name
- (make-temp-file "curl:") (temp-directory)))
+ (let ((lfile (make-temp-name
+ (expand-file-name "curl:" (temp-directory))))
(resp nil))
(curl:download uri lfile :header t :nobody t)
(with-temp-buffer
(resp nil))
(curl:download uri lfile :header t :nobody t)
(with-temp-buffer
(if (fboundp 'find-buffer-file-type)
(symbol-function 'find-buffer-file-type)
nil))
(if (fboundp 'find-buffer-file-type)
(symbol-function 'find-buffer-file-type)
nil))
- (lfile (expand-file-name
- (make-temp-file "curl:") (temp-directory))))
+ (lfile (make-temp-name
+ (expand-file-name "curl:" (temp-directory)))))
(unwind-protect
(progn
(curl:download uri lfile)
(unwind-protect
(progn
(curl:download uri lfile)