cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: sftp postquote command rename fix/diff question

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 9 May 2007 11:15:33 -0700

On Wed, May 09, 2007 at 10:56:37AM +0200, Kristian Gunstone wrote:
> However, when I issued the 'rename' command I noticed that I would get
> an error if the destination file already existed. Pollita(freenode)
> informed me that this was not a 'bug' in libssh2, but that this was how
> the standard specified it should respond.
>
> Either way, I made a modification in curl (/lib/ssh.c) which would check
> if the destination file existed, and if it did, unlink it before the
> rename was issued.

I'm not sure I like this idea. If it returns an error, the app can always
send an 'rm' command then another 'rename'. Some applications might not
want to nuke a file if it already exists.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2007-05-09