|
@@ -1,6 +1,7 @@
|
|
package v1
|
|
package v1
|
|
|
|
|
|
import (
|
|
import (
|
|
|
|
+ "fmt"
|
|
"net/http"
|
|
"net/http"
|
|
"reflect"
|
|
"reflect"
|
|
"strconv"
|
|
"strconv"
|
|
@@ -309,12 +310,12 @@ func AddPartition(c *gin.Context) {
|
|
formatBool := true
|
|
formatBool := true
|
|
for formatBool {
|
|
for formatBool {
|
|
currentDisk = service.MyService.Disk().GetDiskInfo(path)
|
|
currentDisk = service.MyService.Disk().GetDiskInfo(path)
|
|
- if len(currentDisk.Children) != 1 {
|
|
|
|
|
|
+ fmt.Println(currentDisk.Children)
|
|
|
|
+ if len(currentDisk.Children) > 0 {
|
|
formatBool = false
|
|
formatBool = false
|
|
break
|
|
break
|
|
}
|
|
}
|
|
time.Sleep(time.Second)
|
|
time.Sleep(time.Second)
|
|
-
|
|
|
|
}
|
|
}
|
|
currentDisk = service.MyService.Disk().GetDiskInfo(path)
|
|
currentDisk = service.MyService.Disk().GetDiskInfo(path)
|
|
if len(currentDisk.Children) != 1 {
|
|
if len(currentDisk.Children) != 1 {
|