mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:57:35 +00:00
LibCore: Make get_current_user_home_path() return String & close passwd
This API was returning a "const char*" and it was unclear who took care of the underlying memory. Returning a String makes that obvious. Also make sure we close the /etc/passwd file when we're done with it.
This commit is contained in:
parent
8a703c0076
commit
7f25959fa2
4 changed files with 15 additions and 10 deletions
|
@ -1 +1,5 @@
|
|||
const char* get_current_user_home_path();
|
||||
#pragma once
|
||||
|
||||
#include <AK/AKString.h>
|
||||
|
||||
String get_current_user_home_path();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue