diff options
author | Ben Wiederhake <BenWiederhake.GitHub@gmx.de> | 2023-05-20 10:35:42 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-05-21 07:50:52 +0200 |
commit | 666e312693c72ef7d741c5eeff38160b38f32662 (patch) | |
tree | d00a5b2f561543fda575ad2a1a457ae6bed17a27 /Userland | |
parent | e935cb9f09a9bdc4f1fd08c3de0f035ee9dbea48 (diff) | |
download | serenity-666e312693c72ef7d741c5eeff38160b38f32662.zip |
userdel: Prefer LibFileSystem over DeprecatedFile
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Utilities/userdel.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Utilities/userdel.cpp b/Userland/Utilities/userdel.cpp index 8efd12892c..f8d29b027f 100644 --- a/Userland/Utilities/userdel.cpp +++ b/Userland/Utilities/userdel.cpp @@ -7,7 +7,6 @@ #include <LibCore/Account.h> #include <LibCore/ArgsParser.h> -#include <LibCore/DeprecatedFile.h> #include <LibCore/System.h> #include <LibFileSystem/FileSystem.h> #include <LibMain/Main.h> @@ -47,9 +46,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) if (access(target_account.home_directory().characters(), F_OK) == -1) return 0; - auto const real_path = Core::DeprecatedFile::real_path_for(target_account.home_directory()); + auto const real_path = TRY(FileSystem::real_path(target_account.home_directory())); - if (real_path == "/") { + if (real_path == "/"sv) { warnln("home directory is /, not deleted!"); return 12; } |