Reproduce:
Set CURLFTPMETHOD_NOCWD and access different URLs reusing the same easy handle.
Consequence:
Killing the performance gain of reusing an easy handle by needless CWD round trips.
Fix:
The bug seems to be in src/lib/ftp.c ftp_parse_url_path():
it compares "ftpc->prevpath" with "data->state.path", and sets "ftpc->cwddone = TRUE" if equal.
This is obviously incorrect for CURLFTPMETHOD_NOCWD where the working directory is not set to state.path, instead it should compare "ftpc->prevpath" against ""
-Lama