Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Commit 14cfe1d

Browse files
committed
delete last-chunk.gz
1 parent f09e491 commit 14cfe1d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bottomless/src/replicator.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use aws_sdk_s3::error::SdkError;
88
use aws_sdk_s3::operation::get_object::builders::GetObjectFluentBuilder;
99
use aws_sdk_s3::operation::list_objects::builders::ListObjectsFluentBuilder;
1010
use aws_sdk_s3::operation::list_objects::ListObjectsOutput;
11-
use aws_sdk_s3::primitives::{ByteStream};
11+
use aws_sdk_s3::primitives::ByteStream;
1212
use aws_sdk_s3::types::{CompletedMultipartUpload, CompletedPart};
1313
use aws_sdk_s3::{Client, Config};
1414
use bytes::{Buf, Bytes, BytesMut};
@@ -737,7 +737,7 @@ impl Replicator {
737737
.bucket(&self.bucket)
738738
.key(key.clone())
739739
.upload_id(upload_id.clone())
740-
.body(ByteStream::from_path(last_chunk_path).await?)
740+
.body(ByteStream::from_path(&last_chunk_path).await?)
741741
.part_number(LAST_PART) // last chunk
742742
.send()
743743
.await?;
@@ -750,6 +750,8 @@ impl Replicator {
750750
})?)
751751
.build(),
752752
);
753+
754+
let _ = tokio::fs::remove_file(last_chunk_path).await;
753755
}
754756

755757
self.client

0 commit comments

Comments
 (0)