mirror of
https://github.com/gilbertchen/duplicacy
synced 2025-12-15 07:43:21 +00:00
Merge pull request #459 from jtackaberry/master
Fix "Failed to fossilize chunk" errors in wasabi backend
This commit is contained in:
@@ -97,8 +97,14 @@ func (storage *WasabiStorage) MoveFile(
|
|||||||
threadIndex int, from string, to string,
|
threadIndex int, from string, to string,
|
||||||
) (err error) {
|
) (err error) {
|
||||||
|
|
||||||
// The from path includes the bucket
|
var from_path string
|
||||||
from_path := fmt.Sprintf("/%s/%s/%s", storage.bucket, storage.storageDir, from)
|
// The from path includes the bucket. Take care not to include an empty storageDir
|
||||||
|
// string as Wasabi's backend will return 404 on URLs with double slashes.
|
||||||
|
if (storage.storageDir == "") {
|
||||||
|
from_path = fmt.Sprintf("/%s/%s", storage.bucket, from)
|
||||||
|
} else {
|
||||||
|
from_path = fmt.Sprintf("/%s/%s/%s", storage.bucket, storage.storageDir, from)
|
||||||
|
}
|
||||||
|
|
||||||
object := fmt.Sprintf("https://%s@%s%s",
|
object := fmt.Sprintf("https://%s@%s%s",
|
||||||
storage.region, storage.endpoint, from_path)
|
storage.region, storage.endpoint, from_path)
|
||||||
|
|||||||
Reference in New Issue
Block a user