From 7b1250478c513a3c02c463ec7cdd62d427957400 Mon Sep 17 00:00:00 2001 From: Bryan Jen Date: Tue, 28 Jun 2016 16:45:56 -0700 Subject: (MODULES-3507) Updates file_line path validation --- lib/puppet/type/file_line.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/puppet/type/file_line.rb b/lib/puppet/type/file_line.rb index f2c6937..a02b514 100644 --- a/lib/puppet/type/file_line.rb +++ b/lib/puppet/type/file_line.rb @@ -93,8 +93,8 @@ Puppet::Type.newtype(:file_line) do newparam(:path) do desc 'The file Puppet will ensure contains the line specified by the line parameter.' validate do |value| - unless (Puppet.features.posix? and value =~ /^\//) or (Puppet.features.microsoft_windows? and (value =~ /^.:\// or value =~ /^\/\/[^\/]+\/[^\/]+/)) - raise(Puppet::Error, "File paths must be fully qualified, not '#{value}'") + unless Puppet::Util.absolute_path?(value) + raise Puppet::Error, "File paths must be fully qualified, not '#{value}'" end end end -- cgit v1.2.3