mirror of
https://github.com/shirou/gopsutil.git
synced 2025-05-06 19:29:13 +08:00
ignore /proc/filesystems errors on android
This commit is contained in:
parent
507e2f7a53
commit
ea0f864aef
@ -10,6 +10,7 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@ -244,7 +245,7 @@ func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, erro
|
|||||||
}
|
}
|
||||||
|
|
||||||
fs, err := getFileSystems()
|
fs, err := getFileSystems()
|
||||||
if err != nil {
|
if err != nil && runtime.GOOS != "android" {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user