From dcc8b42810d34b2b906f0307c26c4826d16ad997 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 7 Jun 2021 14:00:02 +0200 Subject: Fix: Make patch path absolute This patch changes the patch-path collecting to make the pathes to patches absolute. This fixes a bug where executing butido from a sub directory of the package repository failed to find the patch files when loading the repository files. Signed-off-by: Matthias Beyer Tested-by: Matthias Beyer --- src/repository/repository.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/repository') diff --git a/src/repository/repository.rs b/src/repository/repository.rs index 170c2b0..f9651a7 100644 --- a/src/repository/repository.rs +++ b/src/repository/repository.rs @@ -150,6 +150,9 @@ impl Repository { .map_ok(|patch| path_relative_to_root.join(patch)) .inspect(|patch| trace!("Patch relative to root: {:?}", patch.as_ref().map(|p| p.display()))) + .map_ok(|patch| root.join(patch)) + .inspect(|patch| trace!("Patch absolute: {:?}", patch.as_ref().map(|p| p.display()))) + // if the patch file exists, use it (as config::Value). // // Otherwise we have an error here, because we're refering to a non-existing file. -- cgit v1.2.3