diff --git a/src/os/cpath/cpath.c b/src/os/cpath/cpath.c index cc74b7d..c1cb191 100644 --- a/src/os/cpath/cpath.c +++ b/src/os/cpath/cpath.c @@ -9,8 +9,6 @@ #include #include -void join_root_and_leaf(const char *root, const char *leaf, char *dst); - u32 wapp_cpath_join_path(Str8 *dst, const Str8List *parts) { if (!dst || !parts) { return CPATH_JOIN_INVALID_ARGS; @@ -133,23 +131,3 @@ LIST_CLEANUP_DIRUP: RETURN_DIRUP: return output; } - -void join_root_and_leaf(const char *root, const char *leaf, char *dst) { - u64 root_length = strlen(root); - u64 leaf_length = strlen(leaf); - - memcpy(dst, root, root_length); - - if (leaf_length == 0) { - return; - } - - u64 copy_start = root_length; - - if (root_length > 0 && root[root_length - 1] != PATH_SEP && leaf[0] != PATH_SEP) { - dst[root_length] = PATH_SEP; - ++copy_start; - } - - memcpy(&(dst[copy_start]), leaf, leaf_length); -}