1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:27:35 +00:00

userdel: Prefer LibFileSystem over DeprecatedFile

This commit is contained in:
Ben Wiederhake 2023-05-20 10:35:42 +02:00 committed by Andreas Kling
parent e935cb9f09
commit 666e312693

View file

@ -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;
}