Skip to content

Commit

Permalink
fix: FilesystemStore remove non-empty prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
LDeakin committed Oct 13, 2023
1 parent 544b277 commit 709b25a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- The `array_subset_iter_contiguous_indices3` test was incorrect as the array shape was invalid for the array subset
- `ArraySubset::extract_bytes` now reserves the appropriate amount of memory
- Sharding codec performance optimisations
- `FilesystemStore::erase_prefix` now correctly removes non-empty directories

### Removed
- **Breaking**: Disabled data type extensions `array::data_type::DataType::Extension`.
Expand Down
2 changes: 1 addition & 1 deletion src/storage/store/filesystem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ impl WritableStorageTraits for FilesystemStore {
let _lock = self.files.lock(); // lock all operations

let prefix_path = self.prefix_to_fs_path(prefix);
let result = std::fs::remove_dir(prefix_path);
let result = std::fs::remove_dir_all(prefix_path);
if let Err(err) = result {
match err.kind() {
std::io::ErrorKind::NotFound => Ok(false),
Expand Down

0 comments on commit 709b25a

Please sign in to comment.