From fb10c09da74cfa1486e98fce6403d41abfcade03 Mon Sep 17 00:00:00 2001 From: Bala FA Date: Mon, 20 Jun 2016 18:47:36 +0530 Subject: [PATCH] posix-utils: remove unused isValidPath() (#1937) --- posix-utils_nix.go | 14 -------------- posix-utils_windows.go | 14 -------------- 2 files changed, 28 deletions(-) diff --git a/posix-utils_nix.go b/posix-utils_nix.go index 011af11e3..7086ea2fd 100644 --- a/posix-utils_nix.go +++ b/posix-utils_nix.go @@ -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 { diff --git a/posix-utils_windows.go b/posix-utils_windows.go index fc43d2743..c938fd3a7 100644 --- a/posix-utils_windows.go +++ b/posix-utils_windows.go @@ -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 {