1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-24 13:48:56 +08:00

fix: join path elements in case it contains spaces

This commit is contained in:
Pierre Gimalac 2024-08-19 10:34:55 +02:00
parent 33251d10ec
commit a1f9e69b5d
No known key found for this signature in database

View File

@ -400,7 +400,7 @@ func (p *Process) MemoryMapsWithContext(ctx context.Context, grouped bool) (*[]M
getBlock := func(firstLine []string, block []string) (MemoryMapsStat, error) {
m := MemoryMapsStat{}
if len(firstLine) >= 6 {
m.Path = firstLine[5]
m.Path = strings.Join(firstLine[5:], " ")
}
for _, line := range block {