lib/core/transports.rb in buildr-1.1.2 vs lib/core/transports.rb in buildr-1.1.3

- old
+ new

@@ -186,10 +186,11 @@ end end # Squeeze the filename into 30 characters. if file_name.size > 30 base, ext = file_name.split(".") + ext ||= "" truncated = "#{base[0..26-ext.size]}...#{ext}" else truncated = file_name end progress_bar.format = "#{truncated}: %3d%% %s %s/%s %s" @@ -310,9 +311,10 @@ puts "Requesting #{@uri}/#{path} " if Rake.application.options.trace if target && File.exist?(target) last_modified = File.stat(target).mtime.utc headers = { "If-Modified-Since" => CGI.rfc1123_date(last_modified) } end + path = path[1..-1] if path[0..0] == '/' @http.request_get(@base_path + path, headers) do |response| case response when Net::HTTPNotModified # No modification, nothing to do. puts "Not modified since last download" if Rake.application.options.trace