2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-26 14:56:29 +00:00
restic/internal
Alexander Neumann 44924ba043 restorer: Fix traverseTree
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
2018-07-21 23:24:40 +02:00
..
archiver archiver: Unroll tree 2018-06-20 22:56:41 +02:00
backend S3 backend: accept AWS_SESSION_TOKEN 2018-07-12 16:18:19 +03:00
cache cache: Don't recreate CACHEDIR.TAG 2018-07-08 12:05:12 +02:00
checker checker: Disable size check for now 2018-07-15 21:52:38 +02:00
crypto crypto: Rework Seal/Open to use sliceForAppend 2017-11-01 10:30:40 +01:00
debug debug: Auto-shorten IDs passed as parameters 2018-01-25 20:49:26 +01:00
errors errors: Make Cause() unwrap *url.Error 2018-01-23 23:14:05 +01:00
filter filter: Allow double wildcard in ChildMatch 2018-06-09 23:18:13 +02:00
fs fs: Add helper functions ReadDir/ReadDirNames 2018-06-20 22:53:53 +02:00
fuse Support NetBSD without fuse 2018-06-16 15:55:04 +09:00
hashing Moves files 2017-07-23 14:19:13 +02:00
index Merge pull request #1582 from restic/optimize-debug-log 2018-01-26 21:57:18 +01:00
limiter rclone: Respect bandwith limits 2018-05-22 20:48:17 +02:00
list Optimize Repository.ListPack() 2018-01-23 22:39:51 -05:00
migrations Fix calls to repo/backend.List() everywhere 2018-01-21 21:15:09 +01:00
mock check: Allow filling the cache during check 2018-04-01 13:59:27 +02:00
options errors: Add "Fatal" prefix for Fatalf() 2018-01-06 23:27:47 +01:00
pack backend: Improve Save() 2018-03-03 15:49:44 +01:00
repository repository: Improve buffer pooling 2018-04-22 11:37:05 +02:00
restic Fix test 2018-07-14 11:51:34 +02:00
restorer restorer: Fix traverseTree 2018-07-21 23:24:40 +02:00
test Add test.Helper, also works with Go 1.8 2018-04-22 11:37:05 +02:00
textfile Add textfile 2018-05-01 14:38:59 +02:00
ui backup: Fix deadlock 2018-06-09 12:15:19 +02:00
walker walker: Don't ignore empty trees by default 2018-06-17 09:49:03 +02:00
worker Run goimports 2017-07-23 14:21:03 +02:00