Fix "Failed to fossilize chunk" errors in wasabi backend

Fixes #458
This commit is contained in:
Jason Tackaberry
2018-07-11 22:53:47 -04:00
parent dfdbfed64b
commit 84f7c513d5

View File

@@ -20,6 +20,7 @@ import (
"fmt"
"net/http"
"time"
"strings"
)
type WasabiStorage struct {
@@ -99,6 +100,8 @@ func (storage *WasabiStorage) MoveFile(
// The from path includes the bucket
from_path := fmt.Sprintf("/%s/%s/%s", storage.bucket, storage.storageDir, from)
// Ensure no double slashes exist in the path which angers Wasabi's backend
from_path = strings.Replace(from_path, "//", "/", -1)
object := fmt.Sprintf("https://%s@%s%s",
storage.region, storage.endpoint, from_path)