deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject [1/2] git commit: * lib/initializers/mock_initialize.rb: fix typo
Date Tue, 19 Feb 2013 23:41:37 GMT
* lib/initializers/mock_initialize.rb: fix typo

We did not create MOCK_STORAGE_DIR when it was missing


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/f73d190b
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/f73d190b
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/f73d190b

Branch: refs/heads/master
Commit: f73d190ba0393acd14ec3f683ac5ff771f41a178
Parents: 8cd277c
Author: David Lutterkort <lutter@redhat.com>
Authored: Mon Feb 18 14:53:50 2013 -0800
Committer: David Lutterkort <lutter@redhat.com>
Committed: Tue Feb 19 15:39:07 2013 -0800

----------------------------------------------------------------------
 server/lib/initializers/mock_initialize.rb |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f73d190b/server/lib/initializers/mock_initialize.rb
----------------------------------------------------------------------
diff --git a/server/lib/initializers/mock_initialize.rb b/server/lib/initializers/mock_initialize.rb
index 7e69190..b358475 100644
--- a/server/lib/initializers/mock_initialize.rb
+++ b/server/lib/initializers/mock_initialize.rb
@@ -28,5 +28,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


Mime
View raw message