summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-06-07 14:00:02 +0200
committerMatthias Beyer <matthias.beyer@atos.net>2021-06-07 14:00:06 +0200
commitdcc8b42810d34b2b906f0307c26c4826d16ad997 (patch)
treef4056e899925ed0ca296926e6275e1503248b1cf
parente253820d0d0f2ea13a0ecd48fc14cf8fbc223eb8 (diff)
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 <matthias.beyer@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
-rw-r--r--src/repository/repository.rs3
1 files changed, 3 insertions, 0 deletions
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.