deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject git commit: Mock: Mock directories are now created with proper 0750 umask (DTACLOUD-139)
Date Wed, 09 May 2012 12:48:42 GMT
Updated Branches:
  refs/heads/master 48e3efca8 -> 4082b96c5


Mock: Mock directories are now created with proper 0750 umask (DTACLOUD-139)


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

Branch: refs/heads/master
Commit: 4082b96c532393981d76457e63b02760fc9514cf
Parents: 48e3efc
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Wed May 9 14:49:26 2012 +0200
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Wed May 9 14:49:26 2012 +0200

----------------------------------------------------------------------
 server/lib/deltacloud/drivers/mock/mock_client.rb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/4082b96c/server/lib/deltacloud/drivers/mock/mock_client.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/mock/mock_client.rb b/server/lib/deltacloud/drivers/mock/mock_client.rb
index 94c56af..956df44 100644
--- a/server/lib/deltacloud/drivers/mock/mock_client.rb
+++ b/server/lib/deltacloud/drivers/mock/mock_client.rb
@@ -26,7 +26,7 @@ module Deltacloud::Drivers::Mock
 
       if ! File::directory?(@storage_root)
         FileUtils::rm_rf(@storage_root)
-        FileUtils::mkdir_p(@storage_root)
+        FileUtils::mkdir_p(@storage_root, :mode => 0750)
         data = Dir[File::join(File::dirname(__FILE__), "data", "*")]
         FileUtils::cp_r(data, @storage_root)
       end
@@ -35,7 +35,7 @@ module Deltacloud::Drivers::Mock
     def dir(collection)
       result = File::join(@storage_root, collection.to_s)
       unless @collections.include?(collection)
-        FileUtils::mkdir_p(result) unless File::directory?(result)
+        FileUtils::mkdir_p(result, :mode => 0750) unless File::directory?(result)
         @collections << collection
       end
       result


Mime
View raw message