Skip to content

Commit

Permalink
[fix] Properly evaluate root disk
Browse files Browse the repository at this point in the history
  • Loading branch information
matbme authored Aug 6, 2023
1 parent 76e23fc commit 89ed0da
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions core/disk-manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 89ed0da

Please sign in to comment.