oberblastmeister / trashy

a cli system trash manager, alternative to rm and trash-cli
Apache License 2.0
372 stars 12 forks source link

trash empty panics when emptying trashed files from mounted drive #89

Closed m4rch3n1ng closed 1 year ago

m4rch3n1ng commented 1 year ago

issue

i have a drive mounted on /mnt/drive, using trash empty --all correctly shows me the trashed files, but confirming "y" on the prompt panics

running the same command (trash-empty) with trash-cli prompts me to delete the trash from /mnt/drive/.Trash-1000/ and then correctly empties the trash

stacktrace

thread 'main' panicked at 'assertion failed: file.exists()', /home/may/.cargo/registry/src/github.com-1ecc6299db9ec823/trash-2.1.5/src/freedesktop.rs:238:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
running with RUST_BACKTRACE=1 gives the exact same message, but gives a stack backtrace with RUST_BACKTRACE=full ``` thread 'main' panicked at 'assertion failed: file.exists()', /home/may/.cargo/registry/src/github.com-1ecc6299db9ec823/trash-2.1.5/src/freedesktop.rs:238:9 stack backtrace: 0: 0x55aabd23626a - 1: 0x55aabd253e9e - 2: 0x55aabd233465 - 3: 0x55aabd236035 - 4: 0x55aabd2376bf - 5: 0x55aabd2373fb - 6: 0x55aabd237dc9 - 7: 0x55aabd237b22 - 8: 0x55aabd23671c - 9: 0x55aabd237872 - 10: 0x55aabd03da83 - 11: 0x55aabd03db1d - 12: 0x55aabd06a574 - 13: 0x55aabd058361 - 14: 0x55aabd06ac6b - 15: 0x55aabd06aa05 - 16: 0x55aabd05850f - 17: 0x55aabd06b068 - 18: 0x55aabd054a73 - 19: 0x55aabd06fb79 - 20: 0x55aabd22d3ec - 21: 0x55aabd06de15 - 22: 0x7f6104344790 - 23: 0x7f610434484a - __libc_start_main 24: 0x55aabd03e0b5 - 25: 0x0 - ```

info

$ trash --version
trashy 2.0.0

running on arch, installed via the AUR

m4rch3n1ng commented 1 year ago

decided to look into why exactly this was happening and it somehow stopped happening? i installed it via cargo to debug and found out that the AUR version is outdated, but when i reinstalled from the AUR it just worked again i think.