Merge pull request #728 from fancybits/android-filesystems

ignore /proc/filesystems errors on android
This commit is contained in:
shirou 2019-07-31 22:10:28 +09:00 committed by GitHub
commit 0bb41276be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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 && all {
return nil, err return nil, err
} }