More tests, better errors.

This commit is contained in:
jregan
2019-11-26 18:13:15 -08:00
parent a2b84fce86
commit f3e735153f
22 changed files with 112 additions and 59 deletions

View File

@@ -19,7 +19,7 @@ func RestrictionRootOnly(
return "", err
}
if f == "" {
return "", fmt.Errorf("'%s' must be a file", path)
return "", fmt.Errorf("'%s' must resolve to a file", path)
}
if !d.HasPrefix(root) {
return "", fmt.Errorf(