return relative paths from got_path_skip_common_ancestor()
diff --git a/lib/path.c b/lib/path.c
index 5be3f98..487e120 100644
--- a/lib/path.c
+++ b/lib/path.c
@@ -132,6 +132,8 @@ got_path_skip_common_ancestor(char **child, const char *parent_abspath,
return got_error(GOT_ERR_BAD_PATH);
if (abspath[len_parent] != '/')
return got_error(GOT_ERR_BAD_PATH);
+ while (abspath[len_parent] == '/')
+ abspath++;
bufsize = len - len_parent + 1;
*child = malloc(bufsize);
if (*child == NULL)