mirror of
https://github.com/edgebox-iot/edgeboxctl.git
synced 2026-09-24 05:41:43 +02:00
GetPath improvements (#20)
* Use named variables for getting path Fixed bug with env var * Fix test * Use utils to get paths
This commit is contained in:
@@ -224,9 +224,9 @@ func getDevicesSpaceUsage(devices []Device) []Device {
|
||||
bucketsUsageSplit := (uint64)(0)
|
||||
othersUsageSplit := (uint64)(0)
|
||||
|
||||
edgeappsDirSize, _ := getDirSize(utils.GetPath("edgeAppsPath"))
|
||||
edgeappsDirSize, _ := getDirSize(utils.GetPath(utils.EdgeAppsPath))
|
||||
// TODO for later: Figure out to get correct paths for each partition...
|
||||
wsAppDataDirSize, _ := getDirSize("/home/system/components/ws/appdata")
|
||||
wsAppDataDirSize, _ := getDirSize(utils.GetPath(utils.WsPath) + "/appdata")
|
||||
|
||||
if partition.Mountpoint == "/" {
|
||||
edgeappsUsageSplit = edgeappsDirSize + wsAppDataDirSize
|
||||
|
||||
Reference in New Issue
Block a user