Ver código fonte

Merge pull request #2734 from Sean-Holcomb/sth/prefix-bucket-fix

Prevent prefix from being applied twice to files
Sean Holcomb 2 anos atrás
pai
commit
540d5973de
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      pkg/storage/prefixedbucketstorage.go

+ 1 - 1
pkg/storage/prefixedbucketstorage.go

@@ -32,7 +32,7 @@ func validPrefix(prefix string) bool {
 }
 
 func conditionalPrefix(prefix, name string) string {
-	if len(name) > 0 {
+	if len(name) > 0 && !strings.HasPrefix(name, prefix) {
 		return withPrefix(prefix, name)
 	}