free(dir);
return result;
}
- free(ftpc->entrypath);
- ftpc->entrypath = dir; /* remember this */
- infof(data, "Entry path is '%s'", ftpc->entrypath);
- /* also save it where getinfo can access it: */
- free(data->state.most_recent_ftp_entrypath);
- data->state.most_recent_ftp_entrypath = strdup(ftpc->entrypath);
- if(!data->state.most_recent_ftp_entrypath)
- return CURLE_OUT_OF_MEMORY;
- ftp_state(data, ftpc, FTP_SYST);
- return result;
}
free(ftpc->entrypath);
data->state.most_recent_ftp_entrypath = strdup(ftpc->entrypath);
if(!data->state.most_recent_ftp_entrypath)
return CURLE_OUT_OF_MEMORY;
+
+ if(!ftpc->server_os && dir[0] != '/') {
+ ftp_state(data, ftpc, FTP_SYST);
+ return CURLE_OK;
+ }
}
else {
/* could not get the path */