From fbfc90fd1e932bcdc06501e1de1f75a07d3c1271 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Fri, 3 Sep 2021 18:52:37 -0700 Subject: [PATCH] adjust formatting remote location --- weed/remote_storage/remote_storage.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weed/remote_storage/remote_storage.go b/weed/remote_storage/remote_storage.go index 4d0b5db8d..3f76452cc 100644 --- a/weed/remote_storage/remote_storage.go +++ b/weed/remote_storage/remote_storage.go @@ -57,6 +57,9 @@ func parseNoBucketLocation(remote string) (loc *remote_pb.RemoteStorageLocation) } func FormatLocation(loc *remote_pb.RemoteStorageLocation) string { + if loc.Bucket == "" { + return fmt.Sprintf("%s%s", loc.Name, loc.Path) + } return fmt.Sprintf("%s/%s%s", loc.Name, loc.Bucket, loc.Path) }