diff options
author | Nick Lewis <nick@puppetlabs.com> | 2011-05-03 16:18:57 -0700 |
---|---|---|
committer | Nick Lewis <nick@puppetlabs.com> | 2011-05-03 16:26:19 -0700 |
commit | 1f112cd61ff9e9a3b4a27314533ea4a91dcca76e (patch) | |
tree | b8a2bd749591d2279b6987a7b44f5d57c4ca40e6 /lib/puppet/file_serving | |
parent | fded269b8b2487184f7cfc409c3e82daa59f595a (diff) | |
download | puppet-1f112cd61ff9e9a3b4a27314533ea4a91dcca76e.tar.gz puppet-1f112cd61ff9e9a3b4a27314533ea4a91dcca76e.tar.xz puppet-1f112cd61ff9e9a3b4a27314533ea4a91dcca76e.zip |
(#7139) Accept '/' as a valid path in filesets
This was unconditionally removing the trailing file separator ('/'), which is
only valid when the file separator isn't the entire path. This fixes 'puppet
resource file <path>'.
Paired-With: Jacob Helwig
Diffstat (limited to 'lib/puppet/file_serving')
-rw-r--r-- | lib/puppet/file_serving/fileset.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/file_serving/fileset.rb b/lib/puppet/file_serving/fileset.rb index c020f036d..f29f70a53 100644 --- a/lib/puppet/file_serving/fileset.rb +++ b/lib/puppet/file_serving/fileset.rb @@ -59,7 +59,7 @@ class Puppet::FileServing::Fileset end def initialize(path, options = {}) - path = path.chomp(File::SEPARATOR) + path = path.chomp(File::SEPARATOR) unless path == File::SEPARATOR raise ArgumentError.new("Fileset paths must be fully qualified") unless File.expand_path(path) == path @path = path |