curl-library
Re: uploading / renaming - using anonymous / non anonymous account
Date: Wed, 13 Mar 2002 15:28:09 +0100 (MET)
On Wed, 13 Mar 2002, Erick Nuwendam wrote:
> I have this piece of code doing fine when using relative path when using an
> anonymous account.
> example : delivery_dir_path="pub/upload"
>
> When I use an non anonymous account, I need to define the path as an
> absolute path.
> example : delivery_dir_path="/home/theaccount/upload"
>
> Does anyone have suggestion to transform this code in order to manage with
> relative path either using anonymous or non anonymous accounts ?
Since you send the command as:
sprintf(rnfr_cmd,"RNFR /%s/%s", delivery_dir_path,"tmp_file") ;
... then it'll always be absolute since it always starts with a slash, and
your second attempt will make the path "//home/theaccount/upload". Maybe the
server doesn't approve of the double slashes?
What does the server respond when you do this?
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/Received on 2002-03-13