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 {
|
for _, Part := range Partitions {
|
||||||
device := strings.Replace(Part.Device, "/dev/", "", -1)
|
device := strings.Replace(Part.Device, "/dev/", "", -1)
|
||||||
if _, ok := self.Partitions[device]; !ok {
|
if _, ok := self.Partitions[device]; !ok {
|
||||||
|
mountPoint := strings.Replace(Part.Mountpoint, "\\040", " ", -1)
|
||||||
self.Partitions[device] = &Partition{
|
self.Partitions[device] = &Partition{
|
||||||
Device: device,
|
Device: device,
|
||||||
Mount: Part.Mountpoint,
|
Mount: mountPoint,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user