mirror of https://github.com/cjbassi/gotop.git
Fix bug when partition mountpoint has a space
This commit is contained in:
parent
fa70da84a3
commit
8103dd377c
|
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue