cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: POST_QUOTE option failing during sftp for rename in Windows sftp server■

From: Naganathan Rajesh <mydreamzz_at_hotmail.com>
Date: Sat, 26 Feb 2011 05:32:26 +0000

Providing dummy command like pwd before rename also is not making the rename to work.It is throwing the same error as file in use.
 
When i tried few more servers,one of the server that worked was WinSSHd(http://www.bitvise.com/winsshd) .I couldnt trace a version history of how the server fixed this.
 
Is there a way by changing libcurl to do a force close of the file followed by executing the post quote command?
 

Best Regards,
N.Rajesh
 

 

> Date: Fri, 25 Feb 2011 11:18:11 -0800
> From: dan_at_coneharvesters.com
> To: curl-library_at_cool.haxx.se
> Subject: Re: POST_QUOTE option failing during sftp for rename in Windows sftp server■
>
> 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
                                               

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