mirror of https://github.com/k3s-io/k3s
Merge pull request #32097 from brendandburns/dev
Automatic merge from submit-queue Don't return an error if a file doesn't exist for IsPathDevice(...) Fixes https://github.com/kubernetes/kubernetes/issues/30455 @saad-ali @thockin fyi, since linux devices and storage.pull/6/head
commit
dceb33d120
|
@ -208,6 +208,9 @@ func exclusiveOpenFailsOnDevice(pathname string) (bool, error) {
|
|||
|
||||
func pathIsDevice(pathname string) (bool, error) {
|
||||
finfo, err := os.Stat(pathname)
|
||||
if os.IsNotExist(err) {
|
||||
return false, nil
|
||||
}
|
||||
// err in call to os.Stat
|
||||
if err != nil {
|
||||
return false, err
|
||||
|
|
Loading…
Reference in New Issue