GNU bug report logs -
#5436
23.1.91; Deleting directories causes unusable file layout in freedesktop trashcan
Previous Next
Full log
Message #8 received at 5436 <at> debbugs.gnu.org (full text, mbox):
Hi David,
Could you take a look at Bug#5436? Thanks.
> I have `delete-by-moving-to-trash' enabled. When I delete a directory
> with `M-x delete-directory' or using `D' in dired on a directory and say
> that I want to delete it recursively, the freedesktop trashcan contains
> entries for each file deleted, and not only one entry for the whole
> directory.
>
> For example, I delete the directory ~/foo with these contents:
>
> ~/foo/
> ~/foo/bar/
> ~/foo/bar/test.txt
>
> After that, the freedesktop trashcan contains these Entries:
>
> --8<---------------cut here---------------start------------->8---
> /home/horn/.local/share/Trash/files:
> total used in directory 20K available 70801444
> drwx------ 4 horn horn 4.0K Jan 21 13:42 .
> drwxr-xr-x 4 horn horn 4.0K Jan 21 13:42 ..
> drwxr-xr-x 2 horn horn 4.0K Jan 21 13:42 bar ###
> drwxr-xr-x 2 horn horn 4.0K Jan 21 13:42 foo
> -rw-r--r-- 1 horn horn 1 Jan 21 13:42 test.txt ###
>
> /home/horn/.local/share/Trash/info:
> total used in directory 20K available 70801444
> drwx------ 2 horn horn 4.0K Jan 21 13:42 .
> drwxr-xr-x 4 horn horn 4.0K Jan 21 13:42 ..
> -rw-r--r-- 1 horn horn 74 Jan 21 13:42 bar.trashinfo ###
> -rw-r--r-- 1 horn horn 70 Jan 21 13:42 foo.trashinfo
> -rw-r--r-- 1 horn horn 83 Jan 21 13:42 test.txt.trashinfo ###
> --8<---------------cut here---------------end--------------->8---
>
> The lines marked with ### are wrong. `delete-directory' should keep the
> structure of the deleted directory and move it as a whole to the trash.
> Else, it's nearly impossible to restore the top level dir foo including
> all contents again, and that's what the trashcan if for, right?
This bug report was last modified 15 years and 119 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.