Bladeren bron

Fixed issue of cannot create admin storage pool

TC pushbot 5 4 jaren geleden
bovenliggende
commit
48e85fda60
1 gewijzigde bestanden met toevoegingen van 7 en 0 verwijderingen
  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