Fail to start server if detected cross-device mounts. (#4807)

Fixes #4764
This commit is contained in:
Harshavardhana
2017-08-15 15:10:50 -07:00
committed by Dee Koder
parent 3d21119ec8
commit 879cef37a1
10 changed files with 487 additions and 3 deletions

View File

@@ -118,3 +118,10 @@ func isSysErrHandleInvalid(err error) bool {
}
return false
}
func isSysErrCrossDevice(err error) bool {
if e, ok := err.(*os.LinkError); ok {
return e.Err == syscall.EXDEV
}
return false
}