diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2022-04-02 16:48:05 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-11 21:09:42 +0200 |
commit | f0aba519c33058f1ddbb0a63fe2a9c1efe646ac9 (patch) | |
tree | 78b8f5a8e127c3626150f9864a3eccba8ad4a8ea /Userland/Utilities/rmdir.cpp | |
parent | 84b67754c0026123236b7bbc88230d37000868de (diff) | |
download | serenity-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/rmdir.cpp')
-rw-r--r-- | Userland/Utilities/rmdir.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Utilities/rmdir.cpp b/Userland/Utilities/rmdir.cpp index fbdd929889..55b43f8f18 100644 --- a/Userland/Utilities/rmdir.cpp +++ b/Userland/Utilities/rmdir.cpp @@ -15,7 +15,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) { TRY(Core::System::pledge("stdio cpath")); - Vector<char const*> paths; + Vector<String> paths; Core::ArgsParser args_parser; args_parser.add_positional_argument(paths, "Directories to remove", "paths"); @@ -23,7 +23,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) int status = 0; for (auto path : paths) { - int rc = rmdir(path); + int rc = rmdir(path.characters()); if (rc < 0) { perror("rmdir"); status = 1; |