fix logical error in path length handling for windows (#9520)

fixes #9515
master
Harshavardhana 4 years ago committed by GitHub
parent a9e83dd42c
commit fea4a1e68e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      cmd/posix.go

@ -110,8 +110,11 @@ func checkPathLength(pathName string) error {
// Disallow more than 1024 characters on windows, there
// are no known name_max limits on Windows.
if runtime.GOOS == "windows" && len(pathName) > 1024 {
return nil
if runtime.GOOS == "windows" {
if len(pathName) <= 1024 {
return nil
}
return errFileNameTooLong
}
// On Unix we reject paths if they are just '.', '..' or '/'

Loading…
Cancel
Save