Skip to content

Commit

Permalink
fix(core/aliyun_drive): Fix write_multi_max_size might overflow (#4830)
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo committed Jun 30, 2024
1 parent cff1fce commit 51bd2ba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/src/services/aliyun_drive/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,11 @@ impl Access for AliyunDriveBackend {
// The min multipart size of AliyunDrive is 100 KiB.
write_multi_min_size: Some(100 * 1024),
// The max multipart size of AliyunDrive is 5 GiB.
write_multi_max_size: Some(5 * 1024 * 1024 * 1024),
write_multi_max_size: if cfg!(target_pointer_width = "64") {
Some(5 * 1024 * 1024 * 1024)
} else {
Some(usize::MAX)
},
delete: true,
copy: true,
rename: true,
Expand Down

0 comments on commit 51bd2ba

Please sign in to comment.