From 90eb937a093b6dd962ee136a4e6f84cfa3ba72cd Mon Sep 17 00:00:00 2001 From: Nick Lewis Date: Tue, 3 May 2011 16:18:57 -0700 Subject: (#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 '. Paired-With: Jacob Helwig --- lib/puppet/file_serving/fileset.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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 -- cgit