~ubuntu-branches/ubuntu/trusty/puppet/trusty

« back to all changes in this revision

Viewing changes to lib/puppet/file_bucket/dipper.rb

  • Committer: Package Import Robot
  • Author(s): Stig Sandbeck Mathisen
  • Date: 2011-10-22 14:08:22 UTC
  • mfrom: (1.1.25) (3.1.32 sid)
  • Revision ID: package-import@ubuntu.com-20111022140822-odxde5lohc45yhuz
Tags: 2.7.6-1
* New upstream release (CVE-2011-3872)
* Remove cherry-picked "groupadd_aix_warning" patch
* Install all new manpages

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
    begin
36
36
      file_bucket_file = Puppet::FileBucket::File.new(contents, :bucket_path => @local_path)
37
37
      files_original_path = absolutize_path(file)
38
 
      dest_path = "#{@rest_path}#{file_bucket_file.name}#{files_original_path}"
 
38
      dest_path = "#{@rest_path}#{file_bucket_file.name}/#{files_original_path}"
 
39
      file_bucket_path = "#{@rest_path}#{file_bucket_file.checksum_type}/#{file_bucket_file.checksum_data}/#{files_original_path}"
39
40
 
40
41
      # Make a HEAD request for the file so that we don't waste time
41
42
      # uploading it if it already exists in the bucket.
42
 
      unless Puppet::FileBucket::File.indirection.head("#{@rest_path}#{file_bucket_file.checksum_type}/#{file_bucket_file.checksum_data}#{files_original_path}")
 
43
      unless Puppet::FileBucket::File.indirection.head(file_bucket_path)
43
44
        Puppet::FileBucket::File.indirection.save(file_bucket_file, dest_path)
44
45
      end
45
46