summaryrefslogtreecommitdiff
path: root/Userland/Utilities/tree.cpp
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-04-02 16:48:05 +0100
committerAndreas Kling <kling@serenityos.org>2022-04-11 21:09:42 +0200
commitf0aba519c33058f1ddbb0a63fe2a9c1efe646ac9 (patch)
tree78b8f5a8e127c3626150f9864a3eccba8ad4a8ea /Userland/Utilities/tree.cpp
parent84b67754c0026123236b7bbc88230d37000868de (diff)
downloadserenity-f0aba519c33058f1ddbb0a63fe2a9c1efe646ac9.zip
Utilities: Read positional arguments as Strings not char*s
This is a pretty trivial change so they're all batched together.
Diffstat (limited to 'Userland/Utilities/tree.cpp')
-rw-r--r--Userland/Utilities/tree.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Utilities/tree.cpp b/Userland/Utilities/tree.cpp
index f90c10e669..c7e8fa5485 100644
--- a/Userland/Utilities/tree.cpp
+++ b/Userland/Utilities/tree.cpp
@@ -106,7 +106,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
{
TRY(Core::System::pledge("stdio rpath tty"));
- Vector<char const*> directories;
+ Vector<String> directories;
Core::ArgsParser args_parser;
args_parser.add_option(flag_show_hidden_files, "Show hidden files", "all", 'a');
@@ -124,7 +124,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
print_directory_tree(".", 0, "");
puts("");
} else {
- for (char const* directory : directories) {
+ for (auto const& directory : directories) {
print_directory_tree(directory, 0, "");
puts("");
}