mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 11:25:08 +00:00
can now tile background and made sure the IRC choose server popup still works
This commit is contained in:
parent
50154a23cb
commit
c23882dde1
15 changed files with 127 additions and 44 deletions
|
@ -3,15 +3,15 @@
|
|||
#include <unistd.h>
|
||||
#include <pwd.h>
|
||||
|
||||
const char *get_current_user_home_path() {
|
||||
if (auto* home_env = getenv("HOME")) {
|
||||
const char* get_current_user_home_path()
|
||||
{
|
||||
if (auto* home_env = getenv("HOME"))
|
||||
return home_env;
|
||||
} else {
|
||||
auto d = "/";
|
||||
uid_t uid = getuid();
|
||||
if (auto* pwd = getpwuid(uid))
|
||||
return pwd->pw_dir;
|
||||
else
|
||||
return d;
|
||||
}
|
||||
|
||||
auto d = "/";
|
||||
uid_t uid = getuid();
|
||||
if (auto* pwd = getpwuid(uid))
|
||||
return pwd->pw_dir;
|
||||
|
||||
return d;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue