Skip to content

Commit

Permalink
S3: skip md5 hashing if incremental uploads aren't even enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
glaszig committed Jul 5, 2015
1 parent 7e02da7 commit 36cc42a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/octopress-deploy/s3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,12 @@ def self.default_config(options={})
protected

def write_file? file
return false unless @incremental

file_digest = Digest::MD5.file(file).hexdigest
o = s3_object file
s3sum = o.etag.tr('"','') if o.exists?
@incremental == false || s3sum.to_s != file_digest
s3sum.to_s != file_digest
end

def s3_object file
Expand Down

0 comments on commit 36cc42a

Please sign in to comment.