diff options
author | Luke Kanies <luke@madstop.com> | 2008-11-04 17:22:27 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-11-04 17:22:27 -0600 |
commit | a9dbb5de66c9a97d13f7e7ade47bb6c3b5fa2e66 (patch) | |
tree | 68cfc356eca467e18e1e4837dd7f575686693d11 /lib/puppet/file_serving | |
parent | bb6619a74866605a07869f9467273d6e2e389dab (diff) | |
download | puppet-a9dbb5de66c9a97d13f7e7ade47bb6c3b5fa2e66.tar.gz puppet-a9dbb5de66c9a97d13f7e7ade47bb6c3b5fa2e66.tar.xz puppet-a9dbb5de66c9a97d13f7e7ade47bb6c3b5fa2e66.zip |
Deduplicating slashes in the fileserving code
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/file_serving')
-rw-r--r-- | lib/puppet/file_serving/base.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/file_serving/base.rb b/lib/puppet/file_serving/base.rb index c59a54786..2a0199dee 100644 --- a/lib/puppet/file_serving/base.rb +++ b/lib/puppet/file_serving/base.rb @@ -23,11 +23,11 @@ class Puppet::FileServing::Base # Return the full path to our file. Fails if there's no path set. def full_path - if relative_path.nil? or relative_path == "" or relative_path == "." + (if relative_path.nil? or relative_path == "" or relative_path == "." path else File.join(path, relative_path) - end + end).gsub(%r{/+}, "/") end def initialize(path, options = {}) |