1
0
mirror of https://github.com/containers/youki synced 2025-04-30 13:20:17 +02:00

Merge pull request #165 from utam0k/fix-cgroup-v2-remove-dir

Use `remove_dir` instead of `remove_dir_all` because youki doesn't have permission to delete contents in cgroup directory.
This commit is contained in:
utam0k 2021-07-28 23:11:45 +09:00 committed by GitHub
commit b236cea615
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

@ -142,7 +142,7 @@ impl CgroupManager for Manager {
fn remove(&self) -> Result<()> {
log::debug!("remove cgroup {:?}", self.full_path);
fs::remove_dir_all(&self.full_path)?;
fs::remove_dir(&self.full_path)?;
Ok(())
}