On Jun 6, 2:43 am, "Ronald Fischer" <email@example.com> wrote:
> Does anyone know a reliable way to detect, whether Net::FTP#chdir was That's odd. I tried running this snippet, connecting from a Windows XP
> successful? Even if the directory does not exist, no exception is
Pro box to a RHEL box:
ftp = FTP.new(host, user, passwd)
It raised an exception for me:
C:/ruby/lib/ruby/1.8/net/ftp.rb:243:in `getresp': 550 Failed to change
from C:/ruby/lib/ruby/1.8/net/ftp.rb:251:in `voidresp'
from C:/ruby/lib/ruby/1.8/net/ftp.rb:274:in `voidcmd'
from C:/ruby/lib/ruby/1.8/monitor.rb:238:in `synchronize'
from C:/ruby/lib/ruby/1.8/net/ftp.rb:272:in `voidcmd'
from C:/ruby/lib/ruby/1.8/net/ftp.rb:677:in `chdir'
Can you tell use more about the platform you're connecting to? Maybe
it's not sending back an expected (or any) response with chdir. You
can tinker with FTP#sendcmd as well to see how it behaves. Or, just
ftp manually, and try to chdir to a bogus directory and see what it