deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@redhat.com
Subject [PATCH 1/2] * lib/initializers/mock_initialize.rb: fix typo
Date Mon, 18 Feb 2013 22:56:29 GMT
From: David Lutterkort <lutter@redhat.com>

We did not create MOCK_STORAGE_DIR when it was missing
---
 server/lib/initializers/mock_initialize.rb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/server/lib/initializers/mock_initialize.rb b/server/lib/initializers/mock_initialize.rb
index c8c24e9..3575a38 100644
--- a/server/lib/initializers/mock_initialize.rb
+++ b/server/lib/initializers/mock_initialize.rb
@@ -11,5 +11,6 @@ BASE_STORAGE_DIR = File.join('/', 'var', 'tmp', "deltacloud-#{ENV['USER']}")
 #
 MOCK_STORAGE_DIR = ENV['DELTACLOUD_MOCK_STORAGE'] || File.join(BASE_STORAGE_DIR, 'mock')
 
-FileUtils.mkpath(BASE_STORAGE_DIR, :mode => 0750) unless File.directory?(BASE_STORAGE_DIR)
-FileUtils.mkpath(BASE_STORAGE_DIR, :mode => 0750) unless File.directory?(MOCK_STORAGE_DIR)
+[BASE_STORAGE_DIR, MOCK_STORAGE_DIR].each do |p|
+  FileUtils.mkpath(p, :mode => 0750) unless File.directory?(p)
+end
-- 
1.8.1.2


Mime
View raw message