Fix bug when partition mountpoint has a space

This commit is contained in:
Caleb Bassi 2018-07-17 13:36:52 -07:00
parent fa70da84a3
commit 8103dd377c
1 changed files with 2 additions and 1 deletions

View File

@ -58,9 +58,10 @@ func (self *Disk) update() {
for _, Part := range Partitions {
device := strings.Replace(Part.Device, "/dev/", "", -1)
if _, ok := self.Partitions[device]; !ok {
mountPoint := strings.Replace(Part.Mountpoint, "\\040", " ", -1)
self.Partitions[device] = &Partition{
Device: device,
Mount: Part.Mountpoint,
Mount: mountPoint,
}
}
}