Skip to content

when checking the consistency of a posixfs also check and repair the trash #2371

@butonic

Description

@butonic

Regarding undelete and the posixfs consistency command.

I had a look at the code. Unfortunately the consistency command does not descend into the .Trash folder. The consistency of files in there will not be checked.

Moving large directories into the trash should be a simple MOVE, however the freedesktop org trash spec uses two files:

  1. it creates a .Trash/info/{fileid}.trashinfo medatata file with the original Path and DeletionDate
  2. the deleted resource is moved to .Trash/files/{fileid}.trashitem

If the file still exists at its original location in the space, with the fileid in the xattrs matching the {fileid}.trashinfo, but no actual {fileid}.trashitem, then either the process died between creating the metadata and moving the item or the file was being restored, but the process died between moving the file back and deleting the corresponding trashinfo.
Regardless of the cause, If the file is availabe in the original location in the space you can just delete the .Trash/info/{fileid}.trashinfo medatata file to get back the consitent state.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Qualification

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions