diff options
author | Mark Oteiza <mvoteiza@udel.edu> | 2017-01-28 12:06:41 -0500 |
---|---|---|
committer | Mark Oteiza <mvoteiza@udel.edu> | 2017-01-28 12:06:41 -0500 |
commit | c7bbddf0eae653b23430c426cb75e0289e9f3a29 (patch) | |
tree | 0be882e19ba442a05a50e7d6a7558af82cef87c5 /lisp/net/eww.el | |
parent | f83363d30e1c78c228e57fe1a5e9ad8faf89f238 (diff) | |
download | emacs-c7bbddf0eae653b23430c426cb75e0289e9f3a29.tar.gz emacs-c7bbddf0eae653b23430c426cb75e0289e9f3a29.tar.bz2 emacs-c7bbddf0eae653b23430c426cb75e0289e9f3a29.zip |
Use access-file in EWW to check before downloading a file
* lisp/net/eww.el (eww-download): Check accessibility of
eww-download-directory to prevent starting a download that will fail
to write.
* src/fileio.c (Faccess_file): Clarify the use of string argument in
the docstring.
Diffstat (limited to 'lisp/net/eww.el')
-rw-r--r-- | lisp/net/eww.el | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 0282fe68e6a..f7e06341443 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1501,6 +1501,7 @@ Differences in #targets are ignored." (defun eww-download () "Download URL under point to `eww-download-directory'." (interactive) + (access-file eww-download-directory "Download failed") (let ((url (get-text-property (point) 'shr-url))) (if (not url) (message "No URL under point") |