summaryrefslogtreecommitdiffstats
path: root/lib/puppet/client
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/client')
-rw-r--r--lib/puppet/client/dipper.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/puppet/client/dipper.rb b/lib/puppet/client/dipper.rb
index a9de76e6f..a3a69ffa4 100644
--- a/lib/puppet/client/dipper.rb
+++ b/lib/puppet/client/dipper.rb
@@ -26,7 +26,11 @@ module Puppet
unless FileTest.exists?(file)
raise(BucketError, "File %s does not exist" % file)
end
- return @driver.addfile(Base64.encode64(File.read(file)),file)
+ contents = File.read(file)
+ unless local?
+ contents = Base64.encode64(contents)
+ end
+ return @driver.addfile(contents,file)
end
# Restore the file
@@ -44,8 +48,10 @@ module Puppet
if restore
#puts "Restoring %s" % file
- if tmp = @driver.getfile(sum)
- newcontents = Base64.decode64(tmp)
+ if newcontents = @driver.getfile(sum)
+ unless local?
+ newcontents = Base64.decode64(newcontents)
+ end
tmp = ""
newsum = Digest::MD5.hexdigest(newcontents)
changed = nil