mirror of
https://github.com/minio/minio.git
synced 2026-06-13 19:00:52 -04:00
posix-utils: remove unused isValidPath() (#1937)
This commit is contained in:
parent
2f136e92f7
commit
fb10c09da7
2 changed files with 0 additions and 28 deletions
|
|
@ -21,22 +21,8 @@ package main
|
|||
import (
|
||||
"os"
|
||||
"strings"
|
||||
"unicode/utf8"
|
||||
)
|
||||
|
||||
const pathMax = 4096 // 4k limit on all unixes.
|
||||
|
||||
// isValidPath verifies if a path name is in accordance with FS limitations.
|
||||
func isValidPath(path string) bool {
|
||||
if len(path) > pathMax || len(path) == 0 {
|
||||
return false
|
||||
}
|
||||
if !utf8.ValidString(path) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// isValidVolname verifies a volname name in accordance with object
|
||||
// layer requirements.
|
||||
func isValidVolname(volname string) bool {
|
||||
|
|
|
|||
|
|
@ -24,22 +24,8 @@ import (
|
|||
"path/filepath"
|
||||
"strings"
|
||||
"syscall"
|
||||
"unicode/utf8"
|
||||
)
|
||||
|
||||
const pathMax = 32 * 1024 // 32K is the maximum limit for UNC paths.
|
||||
|
||||
// isValidPath verifies if a path name is in accordance with FS limitations.
|
||||
func isValidPath(path string) bool {
|
||||
if len(path) > pathMax || len(path) == 0 {
|
||||
return false
|
||||
}
|
||||
if !utf8.ValidString(path) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// isValidVolname verifies a volname name in accordance with object
|
||||
// layer requirements.
|
||||
func isValidVolname(volname string) bool {
|
||||
|
|
|
|||
Loading…
Reference in a new issue