aboutsummaryrefslogtreecommitdiff
path: root/bpkg/package.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/package.hxx')
-rw-r--r--bpkg/package.hxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/bpkg/package.hxx b/bpkg/package.hxx
index 02d2b07..947393b 100644
--- a/bpkg/package.hxx
+++ b/bpkg/package.hxx
@@ -1318,6 +1318,18 @@ namespace bpkg
std::string
string (database&) const;
+ // Return the relative archive path completed using the configuration
+ // directory. Return the absolute archive path as is.
+ //
+ path
+ effective_archive (const dir_path& configuration) const
+ {
+ // Cast for compiling with ODB (see above).
+ //
+ assert (static_cast<bool> (archive));
+ return archive->absolute () ? *archive : configuration / *archive;
+ }
+
// Return the relative source directory completed using the configuration
// directory. Return the absolute source directory as is.
//