Skip to content

hash the file contents, not the pathname #6

@calestyo

Description

@calestyo

I personally probably don't need this, but just as an idea:

Hashing the pathname has a number of disadvantages, well mostly one,... what if the file (or an of its parent dirs) is moved?

  1. What I've described in chapters files as sidecars mpv-player/mpv#11248, namely hashing the file’s contents. Just with some minor change, namely not hashing the full file, but perhaps only the first 1MB or so.... or perhaps better somewhere in the middle of the file. Of course this won’t work with streamed file.
  2. Another idea would be to attach XATTRs to the file and use UUIDs. But again, wouldn't work on streamed data, and sometimes XATTRs may get "lost".

Maybe one could just keep hashing the pathname for any paths that don't start with / or file:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions