diff options
Diffstat (limited to 'lib/chef/mixin/create_path.rb')
-rw-r--r-- | lib/chef/mixin/create_path.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/chef/mixin/create_path.rb b/lib/chef/mixin/create_path.rb index 9d1248e907..31ef81e4be 100644 --- a/lib/chef/mixin/create_path.rb +++ b/lib/chef/mixin/create_path.rb @@ -45,8 +45,11 @@ class Chef file_path.each_index do |i| create_path = File.join(file_path[0, i + 1]) unless File.directory?(create_path) - Chef::Log.debug("Creating directory #{create_path}") - Dir.mkdir(create_path) + begin + Chef::Log.debug("Creating directory #{create_path}") + Dir.mkdir(create_path) + rescue Errno::EEXIST + end end end File.expand_path(File.join(file_path)) |