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: [email protected]
> To: [email protected]
> 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

Reply via email to