From f0c07b17048dd170e33f6cbab24bcf95b1a99fd0 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Fri, 15 Apr 2022 19:03:20 +0300 Subject: [PATCH] Fix bucket/path split for volume names --- pkg/driver/controllerserver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/driver/controllerserver.go b/pkg/driver/controllerserver.go index 8630c3e..4ce6d86 100644 --- a/pkg/driver/controllerserver.go +++ b/pkg/driver/controllerserver.go @@ -210,7 +210,7 @@ func sanitizeVolumeID(volumeID string) string { func volumeIDToBucketPrefix(volumeID string) (string, string) { // if the volumeID has a slash in it, this volume is // stored under a certain prefix within the bucket. - splitVolumeID := strings.Split(volumeID, "/") + splitVolumeID := strings.SplitN(volumeID, "/", 2) if len(splitVolumeID) > 1 { return splitVolumeID[0], splitVolumeID[1] }