diff options
-rw-r--r-- | snekbox/memfs.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/snekbox/memfs.py b/snekbox/memfs.py index f45e37a..2372d43 100644 --- a/snekbox/memfs.py +++ b/snekbox/memfs.py @@ -7,7 +7,6 @@ import subprocess from collections.abc import Generator from contextlib import contextmanager from pathlib import Path -from shutil import rmtree from threading import BoundedSemaphore from types import TracebackType from typing import Type @@ -48,7 +47,8 @@ def unmount_tmpfs(name: str) -> None: """Unmount and remove a tmpfs directory.""" tmp = NAMESPACE_DIR / name subprocess.check_call(["umount", str(tmp)]) - rmtree(tmp, ignore_errors=True) + # Unmounting will not remove the original folder, so do that here + tmp.rmdir() class MemFS: |