cURL Mailing List Monthly Index Single Mail
curl-library Mailing List Archives
Re: SFTP create missing directories patch
On Saturday, 2. June 2007, Daniel Stenberg wrote:
> On Fri, 1 Jun 2007, Tom Regner wrote:
> > I just implemented that sftp will honour the
> > CURLOPT_FTP_CREATE_MISSING_DIRS setting - a feature I need right now;
> > I'm quite unsure if the way I implemented it will meet with approval on
> > your part - I simply await your comments.
> Thanks for your contribution! Here's my comments:
> First, the code is > 80 columns wide and doesn't follow the curl code style
> in regards to indenting etc.
Indenting is fixed (2 spaces) - is there a document describing the complete
style-guideline - or better yet a fitting indent example - beside the
paragraph in docs/CONTRIBUTING?
> But functionality wise, I'm a bit concerned that you take all
> libssh2_sftp_open() failures as a signal to attempt the creation of missing
> dirs. Wouldn't it make more sense to check for specific errors?
Of course - I attached a patch for an a bit more polished version - the reason
I try to create the directories, and continue to try, after I get
LIBSSH2_FX_FAILURE is that I received that error in a test-case where to
continue is perfectly legal (and I would have expected
LIBSSH2_FX_FILE_ALREADY_EXISTS of LIBSSH2_FX_PERMISSION_DENIED).
Tom Regner -- Jabber: tomte_at_tomsdiner.org
Received on 2007-06-04
These mail archives are generated by hypermail.
Page updated November 12, 2010.
File upload with ASP.NET
web site info