diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-27 18:20:37 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-27 18:20:37 +0000 |
| commit | 92ff7121ec656b36815b14533fba5e92c165eb08 (patch) | |
| tree | 3bf068822a983aba185db9366ccbba846005e594 /lib/puppet/client | |
| parent | 8ff7e0c75eda0291a169074c67fa0a90db9c4e7b (diff) | |
| download | puppet-92ff7121ec656b36815b14533fba5e92c165eb08.tar.gz puppet-92ff7121ec656b36815b14533fba5e92c165eb08.tar.xz puppet-92ff7121ec656b36815b14533fba5e92c165eb08.zip | |
Fixing #365. I am not sure what the problem was in previous versions, because the new graphing stuff changed the solution to this problem, but it all works now.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1972 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/client')
| -rw-r--r-- | lib/puppet/client/dipper.rb | 12 |
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 |
