1
Fork 0
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:
Christopher Dumas 2019-05-26 10:14:03 -07:00 committed by Andreas Kling
parent 50154a23cb
commit c23882dde1
15 changed files with 127 additions and 44 deletions

View file

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