summaryrefslogtreecommitdiffstats
path: root/lib/puppet/file_serving/fileset.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/file_serving/fileset.rb')
-rw-r--r--lib/puppet/file_serving/fileset.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/file_serving/fileset.rb b/lib/puppet/file_serving/fileset.rb
index a90734a2b..b28fb2d7e 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(@path, '').sub(%r{^/},'') }
+ result = files.collect { |file| file.sub(%r{^#{Regexp.escape(@path)}/*}, '') }
# And add the path itself.
result.unshift(".")
@@ -122,7 +122,7 @@ class Puppet::FileServing::Fileset
return result
end
-
+ public
# Stat a given file, using the links-appropriate method.
def stat(path)
unless defined?(@stat_method)