From b58174f0ebe31fb56fe891bfbcf10979079053e3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 18 Dec 2020 16:54:14 +0100 Subject: Add lilv_path_absolute_child() --- src/filesystem.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/filesystem.c') diff --git a/src/filesystem.c b/src/filesystem.c index 0ec9802..0482336 100644 --- a/src/filesystem.c +++ b/src/filesystem.c @@ -134,6 +134,16 @@ lilv_path_absolute(const char* path) } } +char* +lilv_path_absolute_child(const char* path, const char* parent) +{ + if (lilv_path_is_absolute(path)) { + return lilv_strdup(path); + } + + return lilv_path_join(parent, path); +} + char* lilv_path_relative_to(const char* path, const char* base) { -- cgit v1.2.1