Skip to content

fix restore from home trash on a separate home volume - #403

Open
curious-rabbit wants to merge 2 commits into
andreafrancia:masterfrom
curious-rabbit:home
Open

fix restore from home trash on a separate home volume#403
curious-rabbit wants to merge 2 commits into
andreafrancia:masterfrom
curious-rabbit:home

Conversation

@curious-rabbit

Copy link
Copy Markdown

parse_original_location rejected absolute Path= entries whenever the trash volume was not "/". The home trash uses absolute paths, so if /home (or XDG_DATA_HOME) is a separate mount, every home-trash entry became unrestorable. Now accept absolute paths. still reject relative paths that escape the volume.

@andreafrancia

Copy link
Copy Markdown
Owner

Explain better with examples.

@curious-rabbit

Copy link
Copy Markdown
Author

When /home (or XDG_DATA_HOME) is a separate mount, files trashed to the home trash cannot be restored. The home trash records absolute paths, and absolute paths were rejected on any volume other than /.

$ trash-restore ~
Non parsable trashinfo file: /home/user/.local/share/Trash/info/report.txt.trashinfo, because Path= must be relative for volume trashes
No files trashed from current dir ('/home/user')

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

Successfully merging this pull request may close these issues.

2 participants