summaryrefslogtreecommitdiffstats
path: root/lib/puppet/file_bucket
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2010-04-09 19:18:56 -0700
committerJesse Wolfe <jes5199@gmail.com>2010-04-09 19:18:56 -0700
commite31fe8ce42ac6582507761c10472ec0d8f5dd7dc (patch)
treecba9a64c0b76b0e966854a54dff66cf3c55a1e04 /lib/puppet/file_bucket
parent3797c7a5af1024aaab08a905559ebd654fa978a6 (diff)
downloadpuppet-e31fe8ce42ac6582507761c10472ec0d8f5dd7dc.tar.gz
puppet-e31fe8ce42ac6582507761c10472ec0d8f5dd7dc.tar.xz
puppet-e31fe8ce42ac6582507761c10472ec0d8f5dd7dc.zip
Fix a failure in new FileBucket where it was impossible to read from a
bucket with a non-default path. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
Diffstat (limited to 'lib/puppet/file_bucket')
-rw-r--r--lib/puppet/file_bucket/dipper.rb3
-rw-r--r--lib/puppet/file_bucket/file.rb2
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/puppet/file_bucket/dipper.rb b/lib/puppet/file_bucket/dipper.rb
index b4a9eb83d..d9239e865 100644
--- a/lib/puppet/file_bucket/dipper.rb
+++ b/lib/puppet/file_bucket/dipper.rb
@@ -49,8 +49,9 @@ class Puppet::FileBucket::Dipper
# Retrieve a file by sum.
def getfile(sum)
source_path = "#{@rest_path}md5/#{sum}"
- file_bucket_file = Puppet::FileBucket::File.find(source_path)
+ file_bucket_file = Puppet::FileBucket::File.find(source_path, :bucket_path => @local_path)
+ raise Puppet::Error, "File not found" unless file_bucket_file
return file_bucket_file.to_s
end
diff --git a/lib/puppet/file_bucket/file.rb b/lib/puppet/file_bucket/file.rb
index 7122bfbbb..1e95e5ef6 100644
--- a/lib/puppet/file_bucket/file.rb
+++ b/lib/puppet/file_bucket/file.rb
@@ -13,7 +13,7 @@ class Puppet::FileBucket::File
attr :paths, true
attr :contents, true
attr :checksum_type
- attr :bucket_path
+ attr :bucket_path, true
def self.default_checksum_type
:md5