Enhance ExistsPath check

It should return error when the check fails (e.g. no permissions, symlink link
loop etc.)
This commit is contained in:
Jan Safranek
2018-05-22 12:56:25 +02:00
parent 7450d1b427
commit 74ba0878a1
16 changed files with 49 additions and 46 deletions

View File

@@ -92,8 +92,8 @@ func (mi *fakeMountInterface) MakeFile(pathname string) error {
return nil
}
func (mi *fakeMountInterface) ExistsPath(pathname string) bool {
return true
func (mi *fakeMountInterface) ExistsPath(pathname string) (bool, error) {
return true, errors.New("not implemented")
}
func (mi *fakeMountInterface) PrepareSafeSubpath(subPath mount.Subpath) (newHostPath string, cleanupAction func(), err error) {