mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -05:00
remove separate file for posix utils. (#5948)
This commit is contained in:
15
cmd/posix.go
15
cmd/posix.go
@@ -42,6 +42,21 @@ const (
|
||||
maxAllowedIOError = 5
|
||||
)
|
||||
|
||||
// isValidVolname verifies a volname name in accordance with object
|
||||
// layer requirements.
|
||||
func isValidVolname(volname string) bool {
|
||||
if len(volname) < 3 {
|
||||
return false
|
||||
}
|
||||
|
||||
if runtime.GOOS == "windows" {
|
||||
// Volname shouldn't have reserved characters in Windows.
|
||||
return !strings.ContainsAny(volname, `\:*?\"<>|`)
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
// posix - implements StorageAPI interface.
|
||||
type posix struct {
|
||||
// Disk usage metrics
|
||||
|
||||
Reference in New Issue
Block a user