diff options
author | Valdis Victor Vitayaudom <valdis.vitayaudom@gmail.com> | 2011-03-05 13:36:02 -0800 |
---|---|---|
committer | Valdis Victor Vitayaudom <valdis.vitayaudom@gmail.com> | 2011-03-05 13:36:02 -0800 |
commit | 455a89129a6860215d8e79972f720eaa7564e625 (patch) | |
tree | 34c3b17843ee4718bfe69c0e088e67dc2471ddcb /lib/puppet/reports/store.rb | |
parent | 609ddcf2b1ae0c835973a584ac20796d962334f6 (diff) | |
download | puppet-455a89129a6860215d8e79972f720eaa7564e625.tar.gz puppet-455a89129a6860215d8e79972f720eaa7564e625.tar.xz puppet-455a89129a6860215d8e79972f720eaa7564e625.zip |
(#5794) create reports directory when creating host specific directory
Diffstat (limited to 'lib/puppet/reports/store.rb')
-rw-r--r-- | lib/puppet/reports/store.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/puppet/reports/store.rb b/lib/puppet/reports/store.rb index 99a9fc177..625a263b3 100644 --- a/lib/puppet/reports/store.rb +++ b/lib/puppet/reports/store.rb @@ -15,7 +15,10 @@ Puppet::Reports.register_report(:store) do dir = File.join(Puppet[:reportdir], client) - Dir.mkdir(dir, 0750) unless FileTest.exists?(dir) + if ! FileTest.exists?(dir) + FileUtils.mkdir_p(dir) + FileUtils.chmod_R(0750, dir) + end # Now store the report. now = Time.now.gmtime |