Userland: Remove extra slashes from find output

I noticed while testing `find` that the output of `find` contains extra
forward slashes if the root path has a trailing slash. This patch fixes
that issue by passing the root path through LexicalPath before
proceeding.
This commit is contained in:
Valtteri Koskivuori 2021-05-07 23:05:05 +03:00 committed by Andreas Kling
parent 406c876fce
commit 33af7075e7

View file

@ -465,8 +465,8 @@ static void walk_tree(const char* root_path, Command& command)
int main(int argc, char* argv[])
{
auto root_path = parse_options(argc, argv);
LexicalPath root_path(parse_options(argc, argv));
auto command = parse_all_commands(argv);
walk_tree(root_path, *command);
walk_tree(root_path.string().characters(), *command);
return g_there_was_an_error ? 1 : 0;
}