Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Non .trashinfo file in info dir" entries when running trash-restore #352

Open
kxkv opened this issue Aug 28, 2024 · 1 comment
Open

"Non .trashinfo file in info dir" entries when running trash-restore #352

kxkv opened this issue Aug 28, 2024 · 1 comment

Comments

@kxkv
Copy link

kxkv commented Aug 28, 2024

Describe the bug

When I run trash-restore I get a very long list of Non .trashinfo file in info dir entries.

$ trash-restore
Non .trashinfo file in info dir
Non .trashinfo file in info dir
Non .trashinfo file in info dir
Non .trashinfo file in info dir
Non .trashinfo file in info dir
Non .trashinfo file in info dir
Non .trashinfo file in info dir
Non .trashinfo file in info dir
Non .trashinfo file in info dir
Non .trashinfo file in info dir
Non .trashinfo file in info dir
Non .trashinfo file in info dir
Non .trashinfo file in info dir
Non .trashinfo file in info dir
Non .trashinfo file in info dir
Non .trashinfo file in info dir
Non .trashinfo file in info dir
Non .trashinfo file in info dir
Non .trashinfo file in info dir
   0 2024-08-28 15:35:57 /home/onlyme/syncDir/file1.pdf
   1 2024-08-28 15:36:07 /home/onlyme/syncDir/file2.pdf
   2 2024-08-28 15:36:08 /home/onlyme/syncDir/file3.pdf
What file to restore [0..2]:

However, when I check the trash folder, I only see trashinfo files:

$ ls -al ~/.local/share/Trash/info/
total 12
drwx------ 1 onlyme onlyme 536 Aug 28 15:36  .
drwx------ 1 onlyme onlyme  18 Aug 26 19:32  ..
-rw------- 1 onlyme onlyme 121 Aug 28 15:35  file1.pdf.trashinfo
-rw------- 1 onlyme onlyme 341 Aug 28 15:36 file2.pdf.trashinfo
-rw------- 1 onlyme onlyme  88 Aug 28 15:36  file3.pdf.trashinfo

Are you using the latest version of trash-cli?
Yes

Have you tried if the bug is present in the latest version of trash-cli?
Yes

Operating system:

  • Arch Linux

Expected behavior
Not having a long list of Non .trashinfo file in info dir entries when running trash-restore.

@andreafrancia
Copy link
Owner

Thank you for your submission.

The problem is clear.

I think that just printing "Non .trashinfo file in info dir" is not informative enough and that printing multiple time the same message "Non .trashinfo file in info dir" is not so useful.

It's ok to notice the user that there is a strange situation in the trash-dirs but the information should either concise or detailed.

A concise information should be something like this.

$ trash-restore
Found a total of 123 non .trashinfo files in trash-dirs. Use `trash-list --find-non-trashinfo` to list them.
   0 2024-08-28 15:35:57 /home/onlyme/syncDir/file1.pdf
   1 2024-08-28 15:36:07 /home/onlyme/syncDir/file2.pdf
   2 2024-08-28 15:36:08 /home/onlyme/syncDir/file3.pdf
What file to restore [0..2]:

The detailed information should be something like this:

$ trash-list --find-non-trashinfo
/Trash-500/info/not-a-trashinfo-file
/Trash-500/info/another-that-should-not-belong-this-dir
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants