papercuts-ninja team mailing list archive
-
papercuts-ninja team
-
Mailing list archive
-
Message #00368
[Bug 974208] Re: Wrong filename when restoring from Trash
I've looked into this one a little more.
The problem is with the code in libnautilus-private/nautilius-file-utilities.c
the function nautilus_restore_files_from_trash()
uses nautilus_file_operations_move()
This moves the files from the trash directory back to the path stored in Trash
Info by passing a destination directory. The problem is there is no destination
filenames given so they end up with the filename used when they were in the
trash directory rather than the original filename.
--
You received this bug notification because you are a member of Paper
Cuts Ninja, which is a bug assignee.
https://bugs.launchpad.net/bugs/974208
Title:
Wrong filename when restoring from Trash
Status in One Hundred Paper Cuts:
Triaged
Status in Nautilus:
New
Status in “nautilus” package in Ubuntu:
Triaged
Bug description:
In this particular scenario, the filename is wrong when restoring a
file from Trash. Here is the exact scenario, that I am able to
reproduce 100% of the time on Ubuntu 12.04 and 10.04 (it probably
affects all Ubuntu versions) :
1. Put 2 files (their content can be identical or different) with the same name in 2 different directories :
mkdir ~/test1
mkdir ~/test2
cp installation_manual.pdf test1/doc.pdf
cp report.pdf test2/doc.pdf
2. Open Nautilus ; go to the "test1" directory and delete the file
"doc.pdf". Go to the "test2" directory and delete the file "doc.pdf".
3. In the Trash directory, you now have :
% ls -l ~/.local/share/Trash/files/
total 19M
-rw-r--r-- 1 alexis alexis 758K avril 5 14:29 doc.2.pdf
-rw-r--r-- 1 alexis alexis 18M avril 5 14:29 doc.pdf
% ls -l ~/.local/share/Trash/info
total 8,0K
-rw-rw-r-- 1 alexis alexis 82 avril 5 14:30 doc.2.pdf.trashinfo
-rw-rw-r-- 1 alexis alexis 82 avril 5 14:30 doc.pdf.trashinfo
% cat ~/.local/share/Trash/info/doc.pdf.trashinfo
[Trash Info]
Path=/home/alexis/test1/doc.pdf
DeletionDate=2012-04-05T14:30:02
% cat ~/.local/share/Trash/info/doc.2.pdf.trashinfo
[Trash Info]
Path=/home/alexis/test2/doc.pdf
DeletionDate=2012-04-05T14:30:07
As you can see, the file "doc.pdf" from the "test2" directory is
renamed "doc.2.pdf" in the Trash directory, but it's related
"trashinfo" file has the right filename "doc.pdf" in the "Path"
variable.
4. In Nautilus, go to the Trash, select the 2 files and clic on
"Restore".
5. Now look at the names of the restored files :
% ls -l ~/test1/
total 18M
-rw-r--r-- 1 alexis alexis 18M avril 5 14:29 doc.pdf
% ls -l ~/test2/
total 760K
-rw-r--r-- 1 alexis alexis 758K avril 5 14:29 doc.2.pdf
As you can see, the file restored in the "test2" directory has a
filename "doc.2.pdf" instead of "doc.pdf".
This bug should certainly be reported upstream, but I don't know which
software component is responsible for this problem ; if someone tells
me which software component is responsible, I can take the time to
report the bug upstream.
To manage notifications about this bug go to:
https://bugs.launchpad.net/hundredpapercuts/+bug/974208/+subscriptions