Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information