From 35d4c15ebecb6e4dd06c3f0f46966d393da4f7d1 Mon Sep 17 00:00:00 2001 From: arkpar Date: Mon, 3 Aug 2015 15:23:28 +0200 Subject: [PATCH] get home dir even when no env available on linux --- libdevcore/FileSystem.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libdevcore/FileSystem.cpp b/libdevcore/FileSystem.cpp index dfda891f5..5e19ab099 100644 --- a/libdevcore/FileSystem.cpp +++ b/libdevcore/FileSystem.cpp @@ -27,7 +27,7 @@ #if defined(_WIN32) #include -#elif defined(__APPLE__) +#else #include #include #include @@ -56,14 +56,12 @@ std::string dev::getDataDir(std::string _prefix) #else boost::filesystem::path dataDirPath; char const* homeDir = getenv("HOME"); -#if defined(__APPLE__) if (!homeDir || strlen(homeDir) == 0) { struct passwd* pwd = getpwuid(getuid()); if (pwd) homeDir = pwd->pw_dir; } -#endif if (!homeDir || strlen(homeDir) == 0) dataDirPath = boost::filesystem::path("/");