Commit Diff


commit - 61a7d79fef51b4bf48411fcd4542401f10acc626
commit + b8b3f2090ed097020d494dbf50d92a34c669707d
blob - 01ae02ebd326f6b7cb885ce12ceef93b6fbcce17
blob + be971e697a2b76f0479272ad328aa87e1fe8450d
--- lib/path.c
+++ lib/path.c
@@ -135,7 +135,9 @@ got_path_skip_common_ancestor(char **child, const char
 int
 got_path_is_root_dir(const char *path)
 {
-	return (path[0] == '/' && path[1] == '\0');
+	while (*path == '/')
+		path++;
+	return (*path == '\0');
 }
 
 int