mirror of
https://github.com/pgsty/minio.git
synced 2026-07-23 06:00:24 +03:00
fix logical error in path length handling for windows (#9520)
fixes #9515
This commit is contained in:
+5
-2
@@ -110,8 +110,11 @@ func checkPathLength(pathName string) error {
|
|||||||
|
|
||||||
// Disallow more than 1024 characters on windows, there
|
// Disallow more than 1024 characters on windows, there
|
||||||
// are no known name_max limits on Windows.
|
// are no known name_max limits on Windows.
|
||||||
if runtime.GOOS == "windows" && len(pathName) > 1024 {
|
if runtime.GOOS == "windows" {
|
||||||
return nil
|
if len(pathName) <= 1024 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return errFileNameTooLong
|
||||||
}
|
}
|
||||||
|
|
||||||
// On Unix we reject paths if they are just '.', '..' or '/'
|
// On Unix we reject paths if they are just '.', '..' or '/'
|
||||||
|
|||||||
Reference in New Issue
Block a user