Skip to content

Commit

Permalink
Merge: Create missing subdirectories when downloading to a file
Browse files Browse the repository at this point in the history
  • Loading branch information
alphapapa committed Aug 16, 2024
2 parents 079882d + fd40a50 commit f2fefb7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ Nothing new yet.

+ The minimum supported Emacs version is now 27.1. (It is no longer practical to test ~plz~ with Emacs versions older than 27.1. For Emacs 26.3, an earlier version of ~plz~ may be used, or this version might be compatible, with or without minor changes, which the maintainer cannot offer support for.)

*Additions*

+ When downloading to a file, the ~--create-dirs~ option is passed to Curl so it will create any necessary subdirectories automatically. ([[https://github.com/alphapapa/plz.el/pull/64][#64]]. Thanks to [[https://github.com/josephmturner][Joseph Turner]] and [[https://ushin.org/][USHIN]].)

*Changes*

+ Option ~plz-timeout~ is removed. (It was the default value for ~plz~'s ~:timeout~ argument, which is passed to Curl as its ~--max-time~ argument, limiting the total duration of a request operation. This argument should be unset by default, because larger or slower downloads might not finish within a certain duration, and it is surprising to the user to have this option set by default, potentially causing requests to timeout unnecessarily.)
Expand Down
3 changes: 2 additions & 1 deletion plz.el
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,8 @@ into the process buffer.
(curl-config-header-args (cl-loop for (key . value) in headers
collect (cons "--header" (format "%s: %s" key value))))
(curl-config-args (append curl-config-header-args
(list (cons "--url" url))
(list (cons "--url" url)
(cons "--create-dirs" ""))
(when connect-timeout
(list (cons "--connect-timeout"
(number-to-string connect-timeout))))
Expand Down

0 comments on commit f2fefb7

Please sign in to comment.