Skip to content

Commit 373b30f

Browse files
committed
fix: fixed remove_file which didn't removed files
1 parent 94cf79b commit 373b30f

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Changelog
22

33
- [Changelog](#changelog)
4+
- [0.4.2](#042)
45
- [0.4.1](#041)
56
- [0.4.0](#040)
67
- [0.3.1](#031)
@@ -14,15 +15,21 @@
1415

1516
---
1617

18+
## 0.4.2
19+
20+
Released on 23/03/2025
21+
22+
- fixed `remove_file` which didn't removed files
23+
1724
## 0.4.1
1825

19-
Released on 16/03/2024
26+
Released on 16/03/2025
2027

2128
- fixed aws-s3 upload. It doesn't support offsets for write, but only multipart
2229

2330
## 0.4.0
2431

25-
Released on 16/03/2024
32+
Released on 16/03/2025
2633

2734
- Migrated to rust `aws-sdk-s3`
2835
- use `testcontainers` for tests

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ name = "remotefs-aws-s3"
1212
readme = "README.md"
1313
repository = "https://github.com/veeso/remotefs-rs-aws-s3"
1414
rust-version = "1.85.0"
15-
version = "0.4.1"
15+
version = "0.4.2"
1616

1717
[dependencies]
1818
aws-config = "1"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<p align="center">~ Remotefs Aws S3 client ~</p>
1212

1313
<p align="center">Developed by <a href="https://veeso.github.io/" target="_blank">@veeso</a></p>
14-
<p align="center">Current version: 0.4.1 (16/03/2025)</p>
14+
<p align="center">Current version: 0.4.12 (23/03/2025)</p>
1515

1616
<p align="center">
1717
<a href="https://opensource.org/licenses/MIT"

src/client.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ impl AwsS3Fs {
186186
key: String,
187187
only_direct_children: bool,
188188
) -> RemoteResult<Vec<S3Object>> {
189+
debug!("query objects with prefix: '{key}'");
190+
189191
let fut = self
190192
.client
191193
.as_ref()
@@ -453,8 +455,8 @@ impl RemoteFs for AwsS3Fs {
453455

454456
fn remove_file(&mut self, path: &Path) -> RemoteResult<()> {
455457
self.check_connection()?;
456-
let path = Self::fmt_path(self.resolve(path).as_path(), true);
457-
debug!("Removing object {}...", path);
458+
let path = Self::fmt_path(self.resolve(path).as_path(), false);
459+
debug!("Removing object '{}'", path);
458460
let fut = self
459461
.client
460462
.as_ref()
@@ -1261,6 +1263,8 @@ mod test {
12611263
metadata.size = file_data.len() as u64;
12621264
assert!(client.create_file(p, &metadata, Box::new(reader)).is_ok());
12631265
assert!(client.remove_file(p).is_ok());
1266+
// stat
1267+
assert!(client.stat(p).is_err());
12641268
finalize_client(client);
12651269
}
12661270

0 commit comments

Comments
 (0)