Browse Source

update web

link 3 years ago
parent
commit
42a56df4a5
6 changed files with 4 additions and 3 deletions
  1. 3 2
      route/v1/disk.go
  2. BIN
      web/img/USB.3ba78dec.png
  3. 1 1
      web/js/2.js
  4. 0 0
      web/js/3.js
  5. 0 0
      web/js/4.js
  6. 0 0
      web/js/app.js

+ 3 - 2
route/v1/disk.go

@@ -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 {

BIN
web/img/USB.3ba78dec.png


File diff suppressed because it is too large
+ 1 - 1
web/js/2.js


File diff suppressed because it is too large
+ 0 - 0
web/js/3.js


File diff suppressed because it is too large
+ 0 - 0
web/js/4.js


File diff suppressed because it is too large
+ 0 - 0
web/js/app.js


Some files were not shown because too many files changed in this diff