From c1aaad85e086adf2cbea564b4f3e22d4d64294c8 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 30 Aug 2021 09:54:05 +0200 Subject: Fix: Do not join patch path with root directory path This fixes the relative pathes for the patch files by not joining it with the root directory path. The exists-check was removed, because the filtering before that already does that. Signed-off-by: Matthias Beyer Tested-by: Matthias Beyer --- src/repository/repository.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/repository/repository.rs b/src/repository/repository.rs index ee2e08f..3cab7c0 100644 --- a/src/repository/repository.rs +++ b/src/repository/repository.rs @@ -94,7 +94,7 @@ impl Repository { .into_iter() .map(|p| { if let Some(current_dir) = path.parent() { - fsr.root().join(current_dir).join(p) + current_dir.join(p) } else { unimplemented!() } @@ -122,7 +122,7 @@ impl Repository { // If we found any patches, use them. Otherwise use the array from before the merge // (which already has the correct pathes from the previous recursion). - let patches = if !patches.is_empty() && patches.iter().all(|p| p.exists()) { + let patches = if !patches.is_empty() { patches } else { patches_before_merge -- cgit v1.2.3