diff --git a/pkg/volume/util/atomic_writer.go b/pkg/volume/util/atomic_writer.go index 2a514be8746..b1345892878 100644 --- a/pkg/volume/util/atomic_writer.go +++ b/pkg/volume/util/atomic_writer.go @@ -257,7 +257,7 @@ func validatePath(targetPath string) error { } if len(targetPath) > maxPathLength { - return fmt.Errorf("invalid path: must be less than %d characters", maxPathLength) + return fmt.Errorf("invalid path: must be less than or equal to %d characters", maxPathLength) } items := strings.Split(targetPath, string(os.PathSeparator)) @@ -266,7 +266,7 @@ func validatePath(targetPath string) error { return fmt.Errorf("invalid path: must not contain '..': %s", targetPath) } if len(item) > maxFileNameLength { - return fmt.Errorf("invalid path: filenames must be less than %d characters", maxFileNameLength) + return fmt.Errorf("invalid path: filenames must be less than or equal to %d characters", maxFileNameLength) } } if strings.HasPrefix(items[0], "..") && len(items[0]) > 2 {