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/configuration.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/configuration.rb')
-rw-r--r-- | lib/puppet/file_serving/configuration.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/puppet/file_serving/configuration.rb b/lib/puppet/file_serving/configuration.rb index 9c38aaa19..bceecc30c 100644 --- a/lib/puppet/file_serving/configuration.rb +++ b/lib/puppet/file_serving/configuration.rb @@ -98,13 +98,14 @@ class Puppet::FileServing::Configuration # Reparse the configuration if necessary. readconfig - raise(ArgumentError, "Cannot find file: Invalid path '%s'" % uri) unless uri =~ %r{/([-\w]+)/?} + raise(ArgumentError, "Cannot find file: Invalid path '%s'" % uri) unless uri =~ %r{^([-\w]+)(/|$)} # the dir is based on one of the mounts # so first retrieve the mount path mount = path = nil + # Strip off the mount name. - mount_name, path = uri.sub(%r{^/}, '').split(File::Separator, 2) + mount_name, path = uri.split(File::Separator, 2) return nil unless mount = @mounts[mount_name] |