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:
Malachi Soord
2022-10-08 18:41:37 +02:00
committed by GitHub
parent 83d2fdcae1
commit 0680b7ffb9
7 changed files with 56 additions and 54 deletions
+2 -2
View File
@@ -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