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

Call enterDir/leaveDir if a directory's child may be selected #3000

Closed
wants to merge 1 commit into from

Commits on Oct 8, 2020

  1. Call enterDir/leaveDir if a directory's child may be selected

    This allows leaveDir to set metadata properly for directories
    with descendants that are selected by an include filter, even
    if the directory in question isn't selected by that filter.
    
    For example, let's say you have the following file in your repo:
    
        /home/user/nested/data/values.txt
    
    ...and / and /home are owned by root, but /home/user and below are owned
    by user.
    
    If you run "restic restore -i /home/user/nested/data -t /tmp/restore $SNAPSHOT" as root,
    /home/user/nested/ will currently be restored with root as the owner,
    even though it's supposed to be owned by user.
    
    This change makes sure that leaveDir is called to restore metadata to
    nodes like /home/user/nested - enterDir is also called under the same
    circumstances for purposes of symmetry.
    
    This fixes GH restic#1402 and (I think) GH restic#2563
    hoelzro committed Oct 8, 2020
    Configuration menu
    Copy the full SHA
    deeff9b View commit details
    Browse the repository at this point in the history