diff options
author | Nick Lewis <nick@puppetlabs.com> | 2011-08-10 13:55:39 -0700 |
---|---|---|
committer | Jacob Helwig <jacob@puppetlabs.com> | 2011-08-19 13:52:59 -0700 |
commit | b6ca78cc8d28dd51ce64de42d20f6fb49dfe814a (patch) | |
tree | d303dca23c628e35162e0a8143de1445d1b601b3 /lib/puppet | |
parent | 4237cb1b12851d42504c9829fc61fe31cb84866c (diff) | |
download | puppet-b6ca78cc8d28dd51ce64de42d20f6fb49dfe814a.tar.gz puppet-b6ca78cc8d28dd51ce64de42d20f6fb49dfe814a.tar.xz puppet-b6ca78cc8d28dd51ce64de42d20f6fb49dfe814a.zip |
Stop trying to make config directories in Windows specs
FileSetting#to_resource had a provision to not attempt to manage files in /dev,
which effectively stopped spec from trying to make their configuration
directories in /dev/null. However, on Windows, the path turns into something
like C:/dev/null, so the specs were still trying to manage their configuration
directories when this wasn't desired or handled by the spec.
Now, we also exclude management of C:/dev (or similar), to mimic the behavior
on Windows. Because this isn't a standard path (and thus will not be used for
anything else), there seems to be no harm in treating it as though it were
really /dev.
Reviewed-By: Josh Cooper <josh@puppetlabs.com>
(cherry picked from commit 44719fcf9f9053a7be1bea59d516f24d2234ede4)
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/util/settings/file_setting.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/util/settings/file_setting.rb b/lib/puppet/util/settings/file_setting.rb index 776398ef4..0fa65d846 100644 --- a/lib/puppet/util/settings/file_setting.rb +++ b/lib/puppet/util/settings/file_setting.rb @@ -86,7 +86,7 @@ class Puppet::Util::Settings::FileSetting < Puppet::Util::Settings::Setting path = File.expand_path(path) return nil unless type == :directory or create_files? or File.exist?(path) - return nil if path =~ /^\/dev/ + return nil if path =~ /^\/dev/ or path =~ /^[A-Z]:\/dev/i resource = Puppet::Resource.new(:file, path) |