cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SFTP create missing directories

From: Tom Regner <tomte_at_tomsdiner.org>
Date: Wed, 13 Jun 2007 17:58:58 +0200

On Wednesday, 13. June 2007, James Housley wrote:
> On Jun 13, 2007, at 11:00 AM, Tom Regner wrote:
> > On Wednesday, 13. June 2007, James Housley wrote:
> > [...]
> >
> >> I still think I would like a more solid way to do this, either with
> >> opendir() or [l]stat(). But, for now so this can make it into the
> >> release #2 was best. It was also getting very messy with the libssh2
> >> non-blocking capability to keep nesting the error loops.
> >
> > [...]
> >
> >> I also think we can use opendir() or [l]stat() in the
> >> create dirs code so we only have to do what is needed.
> >
> > Definitly - I simply scratched my itch by reading the docs at
> > http://tools.ietf.org/html/draft-ietf-secsh-filexfer-13 and
> > libssh2-includes for the minimum I needed to implement a
> > working version as fast as possible.
> >
> > I now took a look at what is there, and FWIW I think we should use
> > stat to
> > gather the necessary informations (possibly not up the path as it
> > is now
> > done, but down the path, as it is likely that directories down the
> > path
> > already exist), and attempt creation only after checking what
> > libssh2_sftp_stat returns.
> >
> > I think I can't help with anything concerning the state-machine,
> > but I would
> > reimplement sftp_create_dirs accordingly if that's ok with you.
>
> Go a head and update it. You can just do the one section that
> matches your libssh2 version if you like and I will do the other.
Ok - have something nearly ready, but it's off to home and kids time - code
comes tomorrow. Shall I continue to post patches, or is it from now on better
I simply mail the function-snippet - whatever is easier for you to include
into your codebase.

kind regards,
Tom

-- 
Tom Regner -- Jabber: tomte_at_tomsdiner.org
http://www.tomsdiner.org

Received on 2007-06-13