Warning: The root directory is not necessary the directory where you are 
when you log into the ftp server which is the "home directory". Home 
directory and root directory may be the same, but not always.

--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
http://www.overbyte.be


----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <twsocket@elists.org>
Sent: Tuesday, October 10, 2006 8:34 PM
Subject: Re: [twsocket] How to handle a failed CWD with FTPClient...


>
>> So you should first change the working directory
>> to the "root" path and then try the second CWD
>> command with the "a\b\c\d" HostDirName ...
>
> No, that would require an extre round-trip.  As
> others have pointed out, you should use "absolute"
> paths by starting all your paths with a '/' (or '\'
> in the case of Windows).  If a path does not start
> with the directory separator, the server will
> interpret it as a path relative to the current directory.
>
> Since you seem to be dropping the connection whenever
> your CWD fails (unnecessary, really), the next time
> that you re-connect it'll start again in the top
> directory, and so that's why re-trying the same
> directory after failing worked.
>
>     -dZ.
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to