From 14ffc9e918c2087a478a1a6daa0aaa8b0607aa9e Mon Sep 17 00:00:00 2001 From: Ben_Kosytorz Date: Tue, 6 Oct 2026 17:15:45 +0200 Subject: [PATCH] sorter: unit-mode inner_rel must carry dirs only, not duplicate the file name --- dlphelper/sorter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlphelper/sorter.py b/dlphelper/sorter.py index 7318738..681536f 100644 --- a/dlphelper/sorter.py +++ b/dlphelper/sorter.py @@ -439,7 +439,10 @@ def sort_plan( while p != Path("."): if str(p) in prov: dest_key, unit_name = str(p), prov[str(p)] - inner_rel = rel.relative_to(p) + # dirs-only relative path (the file name itself is + # appended by build_target; keeping it here would + # duplicate it in the target path) + inner_rel = rel.relative_to(p).parent break p = p.parent if unit_name is None: