From 89ed0dadf7265bae20857bfd6f3bdb883c61b45b Mon Sep 17 00:00:00 2001 From: "Mateus B. Melchiades" Date: Sun, 6 Aug 2023 19:38:07 -0300 Subject: [PATCH] [fix] Properly evaluate root disk --- core/disk-manager.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/core/disk-manager.go b/core/disk-manager.go index 855088e1..db98b721 100644 --- a/core/disk-manager.go +++ b/core/disk-manager.go @@ -86,15 +86,9 @@ func (d *DiskManager) GetDiskByPartition(partition string) (Disk, error) { func (d *DiskManager) GetCurrentDisk() (Disk, error) { PrintVerbose("DiskManager.GetCurrentDisk: running...") - root, err := os.Getwd() - if err != nil { - PrintVerbose("DiskManager.GetCurrentDisk:err: %s", err) - return Disk{}, err - } - // we need to evaluate symlinks to get the real root path // in case of weird setups - root, err = filepath.EvalSymlinks(root) + root, err := filepath.EvalSymlinks("/") if err != nil { PrintVerbose("DiskManager.GetCurrentDisk:err(2): %s", err) return Disk{}, err