Skip to content

Commit cc26198

Browse files
committed
fix: Test errors fix for Node js and recursive delete
Signed-off-by: Shashank Singh <shashanksgh3@gmail.com>
1 parent a2fe311 commit cc26198

File tree

3 files changed

+7
-16
lines changed

3 files changed

+7
-16
lines changed

bindings/nodejs/generated.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
* under the License.
1818
*/
1919

20+
/// <reference types="node" />
21+
2022
/* auto-generated by NAPI-RS */
2123
/* eslint-disable */
2224

@@ -1051,6 +1053,8 @@ export declare class Writer {
10511053

10521054
export interface DeleteOptions {
10531055
version?: string
1056+
/** Set `if_match` for this operation. */
1057+
ifMatch?: string
10541058
/** Whether to delete recursively. */
10551059
recursive?: boolean
10561060
}

core/core/src/raw/ops.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ impl OpCreateDir {
4343
#[derive(Debug, Clone, Default, Eq, Hash, PartialEq)]
4444
pub struct OpDelete {
4545
version: Option<String>,
46-
recursive: bool,
4746
if_match: Option<String>,
4847
}
4948

@@ -61,22 +60,11 @@ impl OpDelete {
6160
self
6261
}
6362

64-
/// Change the recursive flag of this delete operation.
65-
pub fn with_recursive(mut self, recursive: bool) -> Self {
66-
self.recursive = recursive;
67-
self
68-
}
69-
7063
/// Get the version of this delete operation.
7164
pub fn version(&self) -> Option<&str> {
7265
self.version.as_deref()
7366
}
7467

75-
/// Whether this delete should remove objects recursively.
76-
pub fn recursive(&self) -> bool {
77-
self.recursive
78-
}
79-
8068
/// Set the If-Match of the option
8169
pub fn with_if_match(mut self, if_match: &str) -> Self {
8270
self.if_match = Some(if_match.to_string());
@@ -93,7 +81,6 @@ impl From<options::DeleteOptions> for OpDelete {
9381
fn from(value: options::DeleteOptions) -> Self {
9482
Self {
9583
version: value.version,
96-
recursive: value.recursive,
9784
if_match: value.if_match,
9885
}
9986
}

core/services/s3/src/backend.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -922,13 +922,13 @@ impl Builder for S3Builder {
922922
},
923923

924924
delete: true,
925-
delete_with_if_match: true,
925+
delete_with_if_match: false,
926926
delete_max_size: Some(delete_max_size),
927927
delete_with_version: config.enable_versioning,
928928

929929
copy: true,
930-
copy_with_if_not_exists: true,
931-
copy_with_if_match: true,
930+
copy_with_if_not_exists: false,
931+
copy_with_if_match: false,
932932

933933
rename: false,
934934
list_with_limit: true,

0 commit comments

Comments
 (0)