mirror of
https://github.com/tobi/disktree.git
synced 2026-11-28 08:00:53 +00:00
remove_dir_all crosses mount boundaries, so permanently deleting a marked directory emptied anything mounted below it (sshfs, NFS, a USB disk, a bind mount) before failing with EBUSY on the mount point. A one-filesystem scan never shows that content, so it was data the user never saw. The plan now refuses a target with a mount point beneath it, and the removal walks the tree itself with openat(O_NOFOLLOW), stopping at a directory on another device or mount (statx mount ID, which also sees same-filesystem bind mounts). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>