[bash] Replace "trash" directory with "undeletable" filesystem flag #170
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm not sure this will work as expected, but we should investigate if the "Undeletable" flag can be used instead of moving files into the
$TRASH_DIRdirectory. This would have two main benefits: No file conflicts in the trash directory (although this is arguably an easy fix), and most importantly we can trash files on other disks without moving them to the trash directory in$HOME(default).We need to investigate if we need to maintain our own record of which files have been deleted, or if ext4 will handle that for us. We also need to investigate if ext4 can list files with this attribute set. We don't want untracked "deleted" files lingering if something goes wrong.
https://en.wikipedia.org/wiki/Chattr#Attributes