Browse Source

Fixed issue of cannot create admin storage pool

TC pushbot 5 4 years ago
parent
commit
48e85fda60
1 changed files with 7 additions and 0 deletions
  1. 7 0
      mod/storage/storage.go

+ 7 - 0
mod/storage/storage.go

@@ -9,6 +9,8 @@ package storage
 */
 
 import (
+	"os"
+
 	fs "imuslab.com/arozos/mod/filesystem"
 )
 
@@ -25,6 +27,11 @@ type StoragePool struct {
 	3. denied
 */
 
+//Create all the required folder structure if it didn't exists
+func init() {
+	os.MkdirAll("./system/storage", 0755)
+}
+
 //Create a new StoragePool objects with given uuids
 func NewStoragePool(fsHandlers []*fs.FileSystemHandler, owner string) (*StoragePool, error) {
 	//Move all fshandler into the storageHandler