From 46711fc8161ef067055366ddf157111e71b06c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20L=C3=BCtke?= Date: Fri, 25 Sep 2026 15:39:33 +0000 Subject: [PATCH] removal: a target under the Data volume's root is inside it Co-Authored-By: Claude Opus 5.5 (1M context) --- crates/disktree-core/src/removal.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/disktree-core/src/removal.rs b/crates/disktree-core/src/removal.rs index e6e4d8f..3874564 100644 --- a/crates/disktree-core/src/removal.rs +++ b/crates/disktree-core/src/removal.rs @@ -390,7 +390,9 @@ fn refuse( if home_key.is_some_and(|home| home.starts_with(&key)) { return Some("it contains the home directory".into()); } - if !key.starts_with(&root_key) { + // By spelling too: the Data volume's root keeps its name as a key, while + // everything under it is keyed as under `/`. + if !key.starts_with(&root_key) && !path.starts_with(root) { return Some("outside the scanned root".into()); } if let Some(system) = system_tree(&key, home_key) {