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

mtree: prepend "./" to all entries other than "." #267

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Jun 5, 2023

  1. mtree: prepend "./" to all entries other than "."

    casync attempts to output all entries as a Full entry but for top-level
    entries, there is no "/" in the escaped pathname, resulting in the entry
    being treated as a Relative entry.
    
    As per the specification[1], this results in any subsequent Relative
    entries (such as top-level files) being treated as children of the
    directory which causes manifests produced by casync to fail.
    
    The simplest solution (and the one that "nmtree -C" does) is to prefix
    every path with "./". However, nmtree does not like "./." (internally it
    requires every entry referenced in an Full entry's path to already have
    been referenced in the spec) and so we have to special-case the "."
    path.
    
    [1]: https://man.netbsd.org/mtree.5
    
    Ref: vbatts/go-mtree#146
    Signed-off-by: Aleksa Sarai <[email protected]>
    cyphar committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    9a71693 View commit details
    Browse the repository at this point in the history