cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: POST_QUOTE option failing during sftp for rename in Windows sftp serverū

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 25 Feb 2011 11:18:11 -0800

On Fri, Feb 25, 2011 at 03:39:03PM +0000, Naganathan Rajesh wrote:
> We are using CURLOPT_POSTQUOTE option to rename a file after transfer of the
> file using sftp protocol.But the POSTQUOTE option for rename is failing when
> the sftp server is runing in Windows O/S.The same code works perfectly when the
> sftp server is Linux or Sun OS.

It's a limitation of Windows. The file ought to be closed by the time the
quote command is run, but maybe there's a race condition in the server. Try
adding a dummy POSTQUOTE command before the rename to give the server time
to close the file first.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-02-25