diff options
author | Jesse Wolfe <jes5199@gmail.com> | 2010-04-09 19:18:56 -0700 |
---|---|---|
committer | Jesse Wolfe <jes5199@gmail.com> | 2010-04-09 19:18:56 -0700 |
commit | e31fe8ce42ac6582507761c10472ec0d8f5dd7dc (patch) | |
tree | cba9a64c0b76b0e966854a54dff66cf3c55a1e04 /lib/puppet/file_bucket | |
parent | 3797c7a5af1024aaab08a905559ebd654fa978a6 (diff) | |
download | puppet-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.rb | 3 | ||||
-rw-r--r-- | lib/puppet/file_bucket/file.rb | 2 |
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 |