diff options
author | Valtteri Koskivuori <vkoskiv@gmail.com> | 2021-05-07 23:05:05 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-07 22:25:39 +0200 |
commit | 33af7075e7624c1e30dc4a52039e2f6bf3fc5823 (patch) | |
tree | 9a59eb0344dcbdcd963c1c12932cb812a775bf4a /Userland/Utilities | |
parent | 406c876fce84b30ae9317be3ce50832bbed2f4b5 (diff) | |
download | serenity-33af7075e7624c1e30dc4a52039e2f6bf3fc5823.zip |
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.
Diffstat (limited to 'Userland/Utilities')
-rw-r--r-- | Userland/Utilities/find.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Utilities/find.cpp b/Userland/Utilities/find.cpp index 700d0a50ca..196656ab1d 100644 --- a/Userland/Utilities/find.cpp +++ b/Userland/Utilities/find.cpp @@ -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; } |