diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-09-03 18:52:37 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-09-03 18:52:37 -0700 |
| commit | fbfc90fd1e932bcdc06501e1de1f75a07d3c1271 (patch) | |
| tree | cd78ec624af28c0915521775cf100f7f10d7eb06 | |
| parent | 491f7636f8a6d24dcb65f1b23132101b2f565b4b (diff) | |
| download | seaweedfs-fbfc90fd1e932bcdc06501e1de1f75a07d3c1271.tar.xz seaweedfs-fbfc90fd1e932bcdc06501e1de1f75a07d3c1271.zip | |
adjust formatting remote location
| -rw-r--r-- | weed/remote_storage/remote_storage.go | 3 |
1 files changed, 3 insertions, 0 deletions
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) } |
