summaryrefslogtreecommitdiffstats
path: root/lib/puppet/reports/store.rb
diff options
context:
space:
mode:
authorValdis Victor Vitayaudom <valdis.vitayaudom@gmail.com>2011-03-05 13:36:02 -0800
committerValdis Victor Vitayaudom <valdis.vitayaudom@gmail.com>2011-03-05 13:36:02 -0800
commit455a89129a6860215d8e79972f720eaa7564e625 (patch)
tree34c3b17843ee4718bfe69c0e088e67dc2471ddcb /lib/puppet/reports/store.rb
parent609ddcf2b1ae0c835973a584ac20796d962334f6 (diff)
downloadpuppet-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.rb5
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