diff options
| author | Daniel Pittman <daniel@puppetlabs.com> | 2011-01-31 11:10:39 -0800 |
|---|---|---|
| committer | Daniel Pittman <daniel@rimspace.net> | 2011-01-31 11:10:39 -0800 |
| commit | 8de9b9aeadcee490065aeb34663ca22c513fd2e4 (patch) | |
| tree | bc21ad9dc02317f8f77fcc18685af52a0b666ad4 /lib/puppet | |
| parent | 95ebc00c4a529c88301b26e1b0c6ecfc3a0cf67f (diff) | |
| parent | 878f266fbf8979bcfeab9faef308816fd4a54c50 (diff) | |
| download | puppet-8de9b9aeadcee490065aeb34663ca22c513fd2e4.tar.gz puppet-8de9b9aeadcee490065aeb34663ca22c513fd2e4.tar.xz puppet-8de9b9aeadcee490065aeb34663ca22c513fd2e4.zip | |
Merge branch 'bug/2.6.next/6091-multiple-slashes-in-path-are-legal' into 2.6.next
Diffstat (limited to 'lib/puppet')
| -rw-r--r-- | lib/puppet/type/file.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/type/file.rb b/lib/puppet/type/file.rb index 0d69446b4..a91e7a504 100644 --- a/lib/puppet/type/file.rb +++ b/lib/puppet/type/file.rb @@ -34,7 +34,7 @@ Puppet::Type.newtype(:file) do validate do |value| # accept various path syntaxes: lone slash, posix, win32, unc - unless (Puppet.features.posix? and (value =~ /^\/$/ or value =~ /^\/[^\/]/)) or (Puppet.features.microsoft_windows? and (value =~ /^.:\// or value =~ /^\/\/[^\/]+\/[^\/]+/)) + unless (Puppet.features.posix? and value =~ /^\//) or (Puppet.features.microsoft_windows? and (value =~ /^.:\// or value =~ /^\/\/[^\/]+\/[^\/]+/)) fail Puppet::Error, "File paths must be fully qualified, not '#{value}'" end end |
