listMultipart: bugfixes. (#1318)

This commit is contained in:
Krishna Srinivas
2016-04-17 00:13:03 +05:30
committed by Harshavardhana
parent 8457af5708
commit 149c6ca094
2 changed files with 43 additions and 28 deletions

View File

@@ -22,6 +22,10 @@ import (
"unicode/utf8"
)
const (
slashPathSeparator = "/"
)
// validBucket regexp.
var validBucket = regexp.MustCompile(`^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$`)
@@ -85,3 +89,7 @@ func IsValidObjectPrefix(object string) bool {
return IsValidObjectName(object)
}
func pathJoin(path1 string, path2 string) string {
return strings.TrimSuffix(path1, slashPathSeparator) + slashPathSeparator + path2
}