cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SFTP create missing directories

From: James Housley <jim_at_thehousleys.net>
Date: Wed, 13 Jun 2007 11:33:39 -0400

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.

Jim

--
/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
  X  - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
jeh@FreeBSD.org      http://www.FreeBSD.org     The Power to Serve
jim@TheHousleys.Net  http://www.TheHousleys.net
---------------------------------------------------------------------
A: Yes.
| Q: Are you sure?
| | A: Because it reverses the logical flow of conversation.
| | | Q: Why is top posting frowned upon?
Received on 2007-06-13