mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-11-06 22:59:44 +00:00
update usb show name
This commit is contained in:
parent
22c7d71f93
commit
991ee424ea
@ -3,6 +3,7 @@ package v1
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -210,6 +211,9 @@ func GetDisksUSBList(c *gin.Context) {
|
||||
tempChildren.Size, _ = strconv.ParseUint(child.FSSize, 10, 64)
|
||||
tempChildren.Avail, _ = strconv.ParseUint(child.FSAvail, 10, 64)
|
||||
tempChildren.Name = child.Label
|
||||
if len(tempChildren.Name) == 0 {
|
||||
tempChildren.Name = filepath.Base(child.MountPoint)
|
||||
}
|
||||
avail, _ := strconv.ParseUint(child.FSAvail, 10, 64)
|
||||
children = append(children, tempChildren)
|
||||
temp.Avail += avail
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user