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.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/file_serving/fileset.rb b/lib/puppet/file_serving/fileset.rb
index 7cd7366be..3cb76317d 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(%r{^#{Regexp.escape(@path)}/*}, '') }
# And add the path itself.
result.unshift(".")