cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: ftp->prevpath bug?

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 16 Dec 2004 17:39:52 +0100 (CET)

On Thu, 16 Dec 2004, Gisle Vanem wrote:

> I didn't quite understand the logic around 'prevpath' in ftp.c. So where
> does the "%2" come from?

The point of this variable is to store the path after a transfer, so that when
another transfer is requested using the same connection, we can check if the
wanted path is the same as the "prevpath" and if so we don't need to change
directory.

I think this particular bug is because there's no file name and the code that
builds prevpath seems to not work then.

> And if I try to upload two files (--upload {file1,filre2}) to the same
> destination, 'prevpath' is correct after file2 only.

I'll write up another test case to repeat your findings, and then I'll correct
my crappy code.

Thanks for your keen eyes!

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-12-16