cURL / Mailing Lists / curl-library / Single Mail


Re: SFTP create missing directories patch

From: Tom Regner <>
Date: Mon, 4 Jun 2007 09:58:04 +0200

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

Kind regards,

Tom Regner -- Jabber:

Received on 2007-06-04