From 844660036bf26437d67a01f89fadc7c1a84c7006 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Mon, 30 Nov 2020 16:22:20 +0100 Subject: [PATCH] gc: don't limit index listing to same filesystem MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WalkDir does not follow symlinks by default anyway, and this behaviour is not documented anywhere. e.g., if a sysadmin mounts 'extra storage' for some backup group or type (not knowing that only metadata is stored in those directories), GC will ignore all the indices contained within and happily garbage collect their chunks.. Signed-off-by: Fabian Grünbichler --- src/backup/datastore.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backup/datastore.rs b/src/backup/datastore.rs index 8ea0a753..a4c437e1 100644 --- a/src/backup/datastore.rs +++ b/src/backup/datastore.rs @@ -380,7 +380,7 @@ impl DataStore { use walkdir::WalkDir; - let walker = WalkDir::new(&base).same_file_system(true).into_iter(); + let walker = WalkDir::new(&base).into_iter(); // make sure we skip .chunks (and other hidden files to keep it simple) fn is_hidden(entry: &walkdir::DirEntry) -> bool {