fix: Automatic intermediate directory cleanup for file object store (#26480)
Removes empty intermediate directories when a key is removed from local file system object storage, which matches cloud-based providers.feat/add-retention-period-to-catalog_core
parent
4c62b5273c
commit
494847b3e9
|
@ -117,11 +117,14 @@ impl std::fmt::Display for LocalFileSystemWithSortedListOp {
|
|||
impl LocalFileSystemWithSortedListOp {
|
||||
fn new_with_prefix(prefix: impl AsRef<std::path::Path>) -> Result<Self, ParseError> {
|
||||
Ok(Self {
|
||||
inner: Arc::new(LocalFileSystem::new_with_prefix(prefix.as_ref()).context(
|
||||
CreateLocalFileSystemSnafu {
|
||||
path: prefix.as_ref().to_path_buf(),
|
||||
},
|
||||
)?),
|
||||
inner: Arc::new(
|
||||
LocalFileSystem::new_with_prefix(prefix.as_ref())
|
||||
.context(CreateLocalFileSystemSnafu {
|
||||
path: prefix.as_ref().to_path_buf(),
|
||||
})?
|
||||
// Clean up intermediate directories automatically.
|
||||
.with_automatic_cleanup(true),
|
||||
),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue