diff options
author | Luke Kanies <luke@madstop.com> | 2008-09-23 23:50:43 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-09-23 23:50:43 -0500 |
commit | bb23861e334e617b544c11bc75a35c40b36185a2 (patch) | |
tree | 18da91858e4fded78a56d673fc69014fdf266676 /lib/puppet/file_serving/fileset.rb | |
parent | e31df2f7f5e98c524b68cd724cfaa3e308e7b9a1 (diff) | |
parent | ac5db5ec115455e54090542870847820357739a2 (diff) | |
download | puppet-bb23861e334e617b544c11bc75a35c40b36185a2.tar.gz puppet-bb23861e334e617b544c11bc75a35c40b36185a2.tar.xz puppet-bb23861e334e617b544c11bc75a35c40b36185a2.zip |
Merge branch 'feature/master/1481'
This merges in the new fileserving code -- we're now using
REST to do fileserving, rather than xmlrpc.
Conflicts:
lib/puppet/parameter.rb
lib/puppet/type/file.rb
spec/unit/type/file.rb
Diffstat (limited to 'lib/puppet/file_serving/fileset.rb')
-rw-r--r-- | lib/puppet/file_serving/fileset.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/puppet/file_serving/fileset.rb b/lib/puppet/file_serving/fileset.rb index fe54350b1..a90734a2b 100644 --- a/lib/puppet/file_serving/fileset.rb +++ b/lib/puppet/file_serving/fileset.rb @@ -20,7 +20,7 @@ class Puppet::FileServing::Fileset # Now strip off the leading path, so each file becomes relative, and remove # any slashes that might end up at the beginning of the path. - result = files.collect { |file| file.sub(%r{^#{@path}/*}, '') } + result = files.collect { |file| file.sub(@path, '').sub(%r{^/},'') } # And add the path itself. result.unshift(".") @@ -30,6 +30,8 @@ class Puppet::FileServing::Fileset # Should we ignore this path? def ignore?(path) + return false if @ignore == [nil] + # 'detect' normally returns the found result, whereas we just want true/false. ! @ignore.detect { |pattern| File.fnmatch?(pattern, path) }.nil? end |