From 57781676d8c624efd31271b865048c9da7ae2aa5 Mon Sep 17 00:00:00 2001 From: Caleb Bassi Date: Thu, 15 Nov 2018 10:07:32 -0800 Subject: [PATCH] Fix #41 --- src/widgets/disk.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/widgets/disk.go b/src/widgets/disk.go index 94bbaba8..a6c8b44e 100644 --- a/src/widgets/disk.go +++ b/src/widgets/disk.go @@ -58,9 +58,12 @@ func (self *Disk) update() { for _, Part := range Partitions { device := strings.Replace(Part.Device, "/dev/", "", -1) if _, ok := self.Partitions[device]; !ok { + // https://github.com/shirou/gopsutil/issues/555 + // have to remove artifacts produced by gopsutil when there's a space in the mount path + mountPoint := strings.Replace(Part.Mountpoint, "\\040", " ", -1) self.Partitions[device] = &Partition{ Device: device, - Mount: Part.Mountpoint, + Mount: mountPoint, } } }