summaryrefslogtreecommitdiff
path: root/methods/aptmethod.h
diff options
context:
space:
mode:
Diffstat (limited to 'methods/aptmethod.h')
-rw-r--r--methods/aptmethod.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/methods/aptmethod.h b/methods/aptmethod.h
index 1c24f3a98..1ea173075 100644
--- a/methods/aptmethod.h
+++ b/methods/aptmethod.h
@@ -514,6 +514,17 @@ protected:
return part;
}
+ static std::string CombineWithAlternatePath(std::string Path, std::string Change)
+ {
+ while (APT::String::Startswith(Change, "../"))
+ {
+ Path.erase(Path.find_last_not_of('/'));
+ Path = flNotFile(Path);
+ Change.erase(0, 3);
+ }
+ return flCombine(Path, Change);
+ }
+
aptMethod(std::string &&Binary, char const *const Ver, unsigned long const Flags) APT_NONNULL(3)
: pkgAcqMethod(Ver, Flags), aptConfigWrapperForMethods(Binary), Binary(std::move(Binary)), SeccompFlags(0)
{