From e4de5a16db6a0ec90a7310b0c38b2fef23279b1a Mon Sep 17 00:00:00 2001 From: Malachi Soord Date: Mon, 14 Feb 2022 21:54:49 +0100 Subject: [PATCH] Use utils to get paths --- cmd/edgeboxctl/main.go | 2 +- internal/storage/storage.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/edgeboxctl/main.go b/cmd/edgeboxctl/main.go index e8f5b22..fd5cc2f 100644 --- a/cmd/edgeboxctl/main.go +++ b/cmd/edgeboxctl/main.go @@ -99,7 +99,7 @@ func printDbDetails() { // IsSystemReady : Checks hability of the service to execute commands (Only after "edgebox --build" is ran at least once via SSH, or if built for distribution) func isSystemReady() bool { - _, err := os.Stat("/home/system/components/ws/.ready") + _, err := os.Stat(utils.GetPath(utils.WsPath) + ".ready") return !os.IsNotExist(err) } diff --git a/internal/storage/storage.go b/internal/storage/storage.go index b3abd1f..8a463fc 100644 --- a/internal/storage/storage.go +++ b/internal/storage/storage.go @@ -226,7 +226,7 @@ func getDevicesSpaceUsage(devices []Device) []Device { 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