this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix #715

+11 -1
+11 -1
src/startup/darling.c
··· 44 44 #include <termios.h> 45 45 #include <ctype.h> 46 46 #include <pty.h> 47 + #include <pwd.h> 47 48 #include "../shellspawn/shellspawn.h" 48 49 #include "darling.h" 49 50 #include "darling-config.h" ··· 1318 1319 mkdir(buf, 0777); 1319 1320 1320 1321 const char* home = getenv("HOME"); 1321 - const char* login = getlogin(); 1322 + 1323 + const char* login = NULL; 1324 + struct passwd* pw = getpwuid(getuid()); 1325 + 1326 + if (pw != NULL) 1327 + login = pw->pw_name; 1328 + 1329 + if (!login) 1330 + login = getlogin(); 1331 + 1322 1332 if (!login) 1323 1333 { 1324 1334 fprintf(stderr, "Cannot determine your user name\n");