summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivek Singh <vivek.singh@msystechnologies.com>2019-02-05 17:04:18 +0530
committerVivek Singh <vivek.singh@msystechnologies.com>2019-02-05 17:14:48 +0530
commit509524f09b778afef4c15a00ddcb58bc197583fd (patch)
tree85d6bef79300c10872457feb2fd4fe62ffc0688e
parent4ae023ba4550165e3e2914cfe60bff7f048f9ab9 (diff)
downloadchef-509524f09b778afef4c15a00ddcb58bc197583fd.tar.gz
Fixes for extra cookbook_path chef-solo
- Create directory recursively instead to assume that parent dir should exist. Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
-rw-r--r--lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb
index e07a73a118..5abd1c238b 100644
--- a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb
+++ b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb
@@ -110,7 +110,8 @@ class Chef
else
child_paths[name].each do |path|
begin
- Dir.mkdir(path, 0700)
+ ::FileUtils.mkdir_p(path)
+ ::FileUtils.chmod(0700, path)
if Chef::Platform.windows?
all_mask = Chef::ReservedNames::Win32::API::Security::GENERIC_ALL
administrators = Chef::ReservedNames::Win32::Security::SID.Administrators