mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:17:35 +00:00
userdel: Prefer LibFileSystem over DeprecatedFile
This commit is contained in:
parent
e935cb9f09
commit
666e312693
1 changed files with 2 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue