summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Bassi <calebjbassi@gmail.com>2018-11-15 10:07:32 -0800
committerCaleb Bassi <calebjbassi@gmail.com>2018-11-15 10:07:32 -0800
commit57781676d8c624efd31271b865048c9da7ae2aa5 (patch)
tree4e0281068548e4d8ac3025ad697e56cae67f8072
parentd44be126844a3d2c96c57662779240324baa3264 (diff)
Fix #41
-rw-r--r--src/widgets/disk.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/widgets/disk.go b/src/widgets/disk.go
index 94bbaba..a6c8b44 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,
}
}
}