summaryrefslogtreecommitdiffstats
path: root/lib/puppet/file_bucket/dipper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/file_bucket/dipper.rb')
-rw-r--r--lib/puppet/file_bucket/dipper.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/puppet/file_bucket/dipper.rb b/lib/puppet/file_bucket/dipper.rb
index d6f6a3747..870c50eec 100644
--- a/lib/puppet/file_bucket/dipper.rb
+++ b/lib/puppet/file_bucket/dipper.rb
@@ -35,11 +35,12 @@ class Puppet::FileBucket::Dipper
begin
file_bucket_file = Puppet::FileBucket::File.new(contents, :bucket_path => @local_path)
files_original_path = absolutize_path(file)
- dest_path = "#{@rest_path}#{file_bucket_file.name}#{files_original_path}"
+ dest_path = "#{@rest_path}#{file_bucket_file.name}/#{files_original_path}"
+ file_bucket_path = "#{@rest_path}#{file_bucket_file.checksum_type}/#{file_bucket_file.checksum_data}/#{files_original_path}"
# Make a HEAD request for the file so that we don't waste time
# uploading it if it already exists in the bucket.
- unless Puppet::FileBucket::File.indirection.head("#{@rest_path}#{file_bucket_file.checksum_type}/#{file_bucket_file.checksum_data}#{files_original_path}")
+ unless Puppet::FileBucket::File.indirection.head(file_bucket_path)
Puppet::FileBucket::File.indirection.save(file_bucket_file, dest_path)
end