adjust formatting remote location

This commit is contained in:
Chris Lu 2021-09-03 18:52:37 -07:00
parent 491f7636f8
commit fbfc90fd1e

View file

@ -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)
}