diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/application/filebucket.rb | 1 | ||||
-rw-r--r-- | lib/puppet/file_bucket/dipper.rb | 9 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/puppet/application/filebucket.rb b/lib/puppet/application/filebucket.rb index 09aaf2b5d..ed67009aa 100644 --- a/lib/puppet/application/filebucket.rb +++ b/lib/puppet/application/filebucket.rb @@ -72,7 +72,6 @@ Puppet::Application.new(:filebucket) do path = options[:bucket] || Puppet[:bucketdir] @client = Puppet::FileBucket::Dipper.new(:Path => path) else - require 'puppet/network/handler' @client = Puppet::FileBucket::Dipper.new(:Server => Puppet[:server]) end rescue => detail diff --git a/lib/puppet/file_bucket/dipper.rb b/lib/puppet/file_bucket/dipper.rb index b13e590a9..b4a9eb83d 100644 --- a/lib/puppet/file_bucket/dipper.rb +++ b/lib/puppet/file_bucket/dipper.rb @@ -35,7 +35,7 @@ class Puppet::FileBucket::Dipper end contents = ::File.read(file) begin - file_bucket_file = Puppet::FileBucket::File.new(contents, :bucket_path => @local_path, :path => file) + file_bucket_file = Puppet::FileBucket::File.new(contents, :bucket_path => @local_path, :path => absolutize_path(file) ) dest_path = "#{@rest_path}#{file_bucket_file.name}" file_bucket_file.save(dest_path) @@ -91,5 +91,12 @@ class Puppet::FileBucket::Dipper return nil end end + + private + def absolutize_path( path ) + require 'pathname' + Pathname.new(path).realpath + end + end |