summaryrefslogtreecommitdiffstats
path: root/lib/puppet/type/file/source.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/type/file/source.rb')
-rwxr-xr-xlib/puppet/type/file/source.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/puppet/type/file/source.rb b/lib/puppet/type/file/source.rb
index 39f85e2ad..8653a8f7a 100755
--- a/lib/puppet/type/file/source.rb
+++ b/lib/puppet/type/file/source.rb
@@ -72,7 +72,7 @@ module Puppet
self.fail "Could not understand source #{source}: #{detail}"
end
- self.fail "Cannot use URLs of type '#{uri.scheme}' as source for fileserving" unless uri.scheme.nil? or %w{file puppet}.include?(uri.scheme)
+ self.fail "Cannot use URLs of type '#{uri.scheme}' as source for fileserving" unless uri.scheme.nil? or %w{file puppet}.include?(uri.scheme) or (Puppet.features.microsoft_windows? and uri.scheme =~ /^[a-z]$/i)
end
end
@@ -180,6 +180,8 @@ module Puppet
private
def uri
+ return nil if metadata.source =~ /^[a-z]:[\/\\]/i # Abspath for Windows
+
@uri ||= URI.parse(URI.escape(metadata.source))
end
end