mirror of
https://github.com/restic/restic.git
synced 2024-12-27 10:17:58 +00:00
44924ba043
traverseTree() was meant to call enterDir() whenever a directory is selected for restore, either explicitly or implicitly (=contains a file which is to be restored). After restoring a file, leaveDir() is called in reverse order for all intermediate directories so that the metadata can be restored. When a directory is selected implicitly, the metadata for it is restored. This is different from the previous restorer behavior, which created implicitly selected intermediate directories with permissions 0700 (only user can read/write it). This commit changes the behavior back to the old one. Only a directory is explicitly selected for restore, enterDir()/leaveDir() are called for it. Otherwise, only visitNode() is called, so visitNode() needs to make sure the parent directory exists. If the directory is explicitly included, leaveDir() will then restore the metadata correctly. When we decide to change the behavior (restore metadata for all intermediate directories, even if selected implicitly), we should do that in the selection functions, not here. This finally resolves #1870 |
||
---|---|---|
.. | ||
archiver | ||
backend | ||
cache | ||
checker | ||
crypto | ||
debug | ||
errors | ||
filter | ||
fs | ||
fuse | ||
hashing | ||
index | ||
limiter | ||
list | ||
migrations | ||
mock | ||
options | ||
pack | ||
repository | ||
restic | ||
restorer | ||
test | ||
textfile | ||
ui | ||
walker | ||
worker |