mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
Kernel: Use TRY() in sys$rmdir()
This commit is contained in:
parent
780737de7a
commit
e0cf9152ca
1 changed files with 2 additions and 4 deletions
|
@ -14,10 +14,8 @@ KResultOr<FlatPtr> Process::sys$rmdir(Userspace<const char*> user_path, size_t p
|
|||
{
|
||||
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
|
||||
REQUIRE_PROMISE(cpath);
|
||||
auto path = get_syscall_path_argument(user_path, path_length);
|
||||
if (path.is_error())
|
||||
return path.error();
|
||||
return VirtualFileSystem::the().rmdir(path.value()->view(), current_directory());
|
||||
auto path = TRY(get_syscall_path_argument(user_path, path_length));
|
||||
return VirtualFileSystem::the().rmdir(path->view(), current_directory());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue