mirror of
https://github.com/pgsty/minio.git
synced 2026-08-04 15:12:47 +03:00
+5
-4
@@ -110,10 +110,7 @@ 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" {
|
||||
if len(pathName) <= 1024 {
|
||||
return nil
|
||||
}
|
||||
if runtime.GOOS == "windows" && len(pathName) > 1024 {
|
||||
return errFileNameTooLong
|
||||
}
|
||||
|
||||
@@ -130,6 +127,10 @@ func checkPathLength(pathName string) error {
|
||||
switch p {
|
||||
case '/':
|
||||
count = 0 // Reset
|
||||
case '\\':
|
||||
if runtime.GOOS == globalWindowsOSName {
|
||||
count = 0
|
||||
}
|
||||
default:
|
||||
count++
|
||||
if count > 255 {
|
||||
|
||||
Reference in New Issue
Block a user