From b2f0d872a273760c5ac65663685faea9be9ecfd5 Mon Sep 17 00:00:00 2001 From: Paul Nasrat Date: Mon, 29 Sep 2008 11:57:26 +0100 Subject: Fix ticket 1596 in new fileset code, use tmpdir in fileserver tests. --- lib/puppet/file_serving/fileset.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/puppet') 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(".") -- cgit