This commit is contained in:
Henrik Rydgard 2012-04-16 00:35:11 +02:00
parent dccb7bafdd
commit bc3f6ee57a
2 changed files with 5 additions and 2 deletions

View file

@ -1,7 +1,8 @@
set(SRCS
LAMEString.cpp
colorutil.cpp
error_context.cpp)
error_context.cpp
display.cpp)
set(SRCS ${SRCS})

View file

@ -6,6 +6,8 @@
#include <shlobj.h>
#include <shlwapi.h>
#include <ShellAPI.h>
#else
#include <pwd.h>
#endif
#include <string>
@ -169,7 +171,7 @@ int main(int argc, char *argv[]) {
#else
// Mac - what about linux? Also, ugly hardcoding.
const char *path = getenv("HOME");
if (!homeDir) {
if (!path) {
struct passwd* pwd = getpwuid(getuid());
if (pwd)
path = pwd->pw_dir;