Fix bucket/path split for volume names
This commit is contained in:
parent
f3ff4f75c3
commit
f0c07b1704
1 changed files with 1 additions and 1 deletions
|
@ -210,7 +210,7 @@ func sanitizeVolumeID(volumeID string) string {
|
||||||
func volumeIDToBucketPrefix(volumeID string) (string, string) {
|
func volumeIDToBucketPrefix(volumeID string) (string, string) {
|
||||||
// if the volumeID has a slash in it, this volume is
|
// if the volumeID has a slash in it, this volume is
|
||||||
// stored under a certain prefix within the bucket.
|
// stored under a certain prefix within the bucket.
|
||||||
splitVolumeID := strings.Split(volumeID, "/")
|
splitVolumeID := strings.SplitN(volumeID, "/", 2)
|
||||||
if len(splitVolumeID) > 1 {
|
if len(splitVolumeID) > 1 {
|
||||||
return splitVolumeID[0], splitVolumeID[1]
|
return splitVolumeID[0], splitVolumeID[1]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue