2009/3/23 Daniel Stenberg <dan...@haxx.se>: > On Mon, 23 Mar 2009, Jean-Louis CHARTON wrote: > >> I was expecting a more accurate error code like >> LIBSSH2_FX_FILE_ALREADY_EXISTS or something like that instead. > > There is no such code available! See > http://tools.ietf.org/wg/secsh/draft-ietf-secsh-filexfer/draft-ietf-secsh-filexfer-02.txt
As I understand it, LIBSSH2_FX_FILE_ALREADY_EXISTS is only returned by SFTP v5+ to indicate that the operation could have succeeded if the call had specified LIBSSH2_SFTP_RENAME_OVERWRITE. As earlier versions of SFTP (i.e. almost anything in the real world) don't support overwriting at all, they don't tell you that you could. I realise this is not very helpful for you, unfortunately. In my own code, I handle the LIBSSH2_FX_FAILURE error by immediately calling libssh2_sftp_stat() to see if the directory actually exists and then react accordingly. HTH Alex ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ libssh2-devel mailing list libssh2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libssh2-devel