D
Daniel Berger
Hi all,
Ruby 1.8.4
Solaris 10, connecting to a Solaris 8 remote host.
I've got a code snippet like the one below. It connects fine, performs =
the=20
chdir fine, performs the nlst fine, but chokes on mtime:
FTP.open(host, user, password) do |ftp|
ftp.chdir(some_dir)
ftp.nlst.each{ |file|
puts file # prints "audit17717447" fine
puts ftp.mtime(file, true) # Boom! See below
}
end
Results:
/opt/csw/lib/ruby/1.8/net/ftp.rb:243:in `getresp': 500 'MDTM =
audit17717447':=20
command not understood. (Net::FTPPermError)
from /opt/csw/lib/ruby/1.8/net/ftp.rb:264:in `sendcmd'
from /opt/csw/lib/ruby/1.8/monitor.rb:229:in `synchronize'
from /opt/csw/lib/ruby/1.8/net/ftp.rb:262:in `sendcmd'
from /opt/csw/lib/ruby/1.8/net/ftp.rb:767:in `mdtm'
from /opt/csw/lib/ruby/1.8/net/ftp.rb:699:in `mtime'
Am I doing something wrong here? I don't see anything like 'MDTM' =
mentioned in=20
my ftp man page. Or is it time to parse the long file name format =
manually?
Thanks,
Dan
This communication is the property of Qwest and may contain confidential =
or
privileged information. Unauthorized use of this communication is =
strictly=20
prohibited and may be unlawful. If you have received this communication =
in error, please immediately notify the sender by reply e-mail and =
destroy=20
all copies of the communication and any attachments.
Ruby 1.8.4
Solaris 10, connecting to a Solaris 8 remote host.
I've got a code snippet like the one below. It connects fine, performs =
the=20
chdir fine, performs the nlst fine, but chokes on mtime:
FTP.open(host, user, password) do |ftp|
ftp.chdir(some_dir)
ftp.nlst.each{ |file|
puts file # prints "audit17717447" fine
puts ftp.mtime(file, true) # Boom! See below
}
end
Results:
/opt/csw/lib/ruby/1.8/net/ftp.rb:243:in `getresp': 500 'MDTM =
audit17717447':=20
command not understood. (Net::FTPPermError)
from /opt/csw/lib/ruby/1.8/net/ftp.rb:264:in `sendcmd'
from /opt/csw/lib/ruby/1.8/monitor.rb:229:in `synchronize'
from /opt/csw/lib/ruby/1.8/net/ftp.rb:262:in `sendcmd'
from /opt/csw/lib/ruby/1.8/net/ftp.rb:767:in `mdtm'
from /opt/csw/lib/ruby/1.8/net/ftp.rb:699:in `mtime'
Am I doing something wrong here? I don't see anything like 'MDTM' =
mentioned in=20
my ftp man page. Or is it time to parse the long file name format =
manually?
Thanks,
Dan
This communication is the property of Qwest and may contain confidential =
or
privileged information. Unauthorized use of this communication is =
strictly=20
prohibited and may be unlawful. If you have received this communication =
in error, please immediately notify the sender by reply e-mail and =
destroy=20
all copies of the communication and any attachments.