mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +00:00
Don't return an error if a file doesn't exist for IsPathDevice(...)
This commit is contained in:
parent
8d00825481
commit
07c8f9a173
@ -208,6 +208,9 @@ func exclusiveOpenFailsOnDevice(pathname string) (bool, error) {
|
|||||||
|
|
||||||
func pathIsDevice(pathname string) (bool, error) {
|
func pathIsDevice(pathname string) (bool, error) {
|
||||||
finfo, err := os.Stat(pathname)
|
finfo, err := os.Stat(pathname)
|
||||||
|
if os.IsNotExist(err) {
|
||||||
|
return false, nil
|
||||||
|
}
|
||||||
// err in call to os.Stat
|
// err in call to os.Stat
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
|
Loading…
Reference in New Issue
Block a user