curl-library
Re: SFTP create missing directories
Date: Wed, 13 Jun 2007 16:11:09 +0200
On Wednesday, 13. June 2007, James Housley wrote:
> On Jun 13, 2007, at 7:55 AM, Daniel Stenberg wrote:
> > On Wed, 13 Jun 2007, James Housley wrote:
> >>> http://curl.haxx.se/mail/lib-2007-06/0021.html
> >>
> >> I have integrated this patch into the code and can commit before
> >> the release if you like. I am using the patch in this file. It
> >> is not the way I would like to do it, but SFTP doesn't provide the
> >> capabilities to do it the way I would really like. There are
> >> still improvements that can be made, but this does work.
> >
> > Fire away! ;-)
>
> Done
[...]
Cool!
I noticed you used my second patch version as basis for the inclusion; do
you mind to explain why not version 3 ? -- the obligatory opendir at
the beginning of an upload shouldn't be too costly, should it?
Since everything else is nearly the same in both versions, I don't
miss something, I'm just curious (I suspect you had the API-depended
stuff already incorporated and saw no point in repeating that step
for almost no change :-) - altough I also cleaned up variable
naming/declaration and error-reporting a bit.
[...]
> It is just not so obvious how this should be mentioned in libcurl/
> curl_easy_setopt.3
I suggest something in the line of:
*** curl-7.16.3-20070601/docs/libcurl/curl_easy_setopt.3 2007-05-31
04:00:01.000000000 +0200
--- curl-7.16.3-20070601.new/docs/libcurl/curl_easy_setopt.3 2007-06-13
16:00:32.000000000 +0200
***************
*** 890,895 ****
--- 890,900 ----
Pass a long. If the value is non-zero, curl will attempt to create any
remote
directory that it fails to CWD into. CWD is the command that changes working
directory. (Added in 7.10.7)
+
+ This setting also applies to SFTP-connections. curl will attempt to create
+ the remote directory if it can't obtain a handle to the target-location. The
+ creation will fail if a file of the same name as the directory to create
+ already exists or lack of permissions prevents creation. (Added in 7.16.3)
.IP CURLOPT_FTP_RESPONSE_TIMEOUT
Pass a long. Causes curl to set a timeout period (in seconds) on the amount
of time that the server is allowed to take in order to generate a response
As always, my english is not the best, but the paragraph contains the
information I would like find.
kind regards,
Tom
-- Tom Regner -- Jabber: tomte_at_tomsdiner.org http://www.tomsdiner.org
- application/pgp-signature attachment: This is a digitally signed message part.