mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-14 23:34:01 -04:00
setupHomeTrash redirects HOME and XDG_DATA_HOME, but allTrashDirs also walks readMountPoints() looking for <mount>/.Trash/<uid> and <mount>/.Trash-<uid>, and no environment variable affects that walk. So Count() and List() included whatever the developer had trashed on a second filesystem, and Empty() deleted it for real: with an orphaned file under a mount trash (no matching .trashinfo, so the count assert still saw 3), TestEmptyClearsAll passed and removed the file. Route the walk through a package-level mountPoints variable and have setupHomeTrash swap in an empty list, restoring it via t.Cleanup. Production behavior is unchanged.