[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5436: 23.1.91; Deleting directories causes unusable file layout in f
From: |
Chong Yidong |
Subject: |
bug#5436: 23.1.91; Deleting directories causes unusable file layout in freedesktop trashcan |
Date: |
Fri, 22 Jan 2010 11:20:25 -0500 |
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?