From e73c6495dc5eea924c72425ef4bc5ef3b83cb596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arpad=20M=C3=BCller?= Date: Fri, 19 Jan 2024 21:54:11 +0100 Subject: [PATCH] Remove the directory as well --- libs/utils/src/fs_ext.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/utils/src/fs_ext.rs b/libs/utils/src/fs_ext.rs index f5ae1d3f07..29b62ace05 100644 --- a/libs/utils/src/fs_ext.rs +++ b/libs/utils/src/fs_ext.rs @@ -66,6 +66,9 @@ pub fn remove_dir_all(path: impl AsRef) -> io::Result<()> { strip_not_found(std::fs::remove_file(entry.path())).unwrap_or(Ok(()))?; } } + if let Some(res) = strip_not_found(std::fs::remove_dir(path)) { + res?; + } Ok(()) }