fix: [fs] an error upon rwPool.Write() just attempt rwPool.Create() (#10533)

On some NFS clients looks like errno is incorrectly set,
which leads to incorrect errors thrown upwards.
This commit is contained in:
Harshavardhana
2020-09-21 12:54:23 -07:00
committed by GitHub
parent aa12d75d75
commit a5da9120f3
3 changed files with 7 additions and 13 deletions
+3
View File
@@ -157,6 +157,9 @@ func (fsi *fsIOPool) Write(path string) (wlk *lock.LockedFile, err error) {
case isSysErrIsDir(err):
return nil, errIsNotRegular
default:
if isSysErrPathNotFound(err) {
return nil, errFileNotFound
}
return nil, err
}
}