lib/fig/protocol/ftp.rb in fig-1.25.0 vs lib/fig/protocol/ftp.rb in fig-1.25.1.beta.1

- old
+ new

@@ -62,11 +62,16 @@ def download(uri, path, prompt_for_login) begin ftp = Net::FTP.new(uri.host) ftp_login(ftp, uri.host, prompt_for_login) - if ::File.exist?(path) && ftp.mtime(uri.path) <= ::File.mtime(path) + if ( + ::File.exist?(path) \ + && ftp.mtime(uri.path) <= ::File.mtime(path) \ + && ftp.size(uri.path) == ::File.size(path) + ) Fig::Logging.debug "#{path} is up to date." + return false else log_download(uri, path) ftp.getbinaryfile(uri.path, path, 256*1024) return true