Merge branch 'release/0.10' into develop

This commit is contained in:
Sebastian Messmer 2021-02-23 08:26:46 -08:00
commit 944c8f2f66
2 changed files with 3 additions and 1 deletions

View File

@ -38,6 +38,7 @@ Fixed bugs:
* Fixed determining the user's homedir: If $HOME and the /etc/passwd entry for the current user contradict each other, now $HOME takes preference over /etc/passwd.
* Fix Android compilation, https://github.com/cryfs/cryfs/issues/345
* Remove cryfs-stats tool which isn't ready yet and could destroy the file system
* Fixed crash on startup when running in an environment that doesn't have $HOME set (e.g. an empty env), https://github.com/cryfs/cryfs/issues/374
Version 0.10.2

View File

@ -9,7 +9,8 @@ using std::string;
#include <pwd.h>
namespace {
bf::path _get_home_directory() {
string homedir = getenv("HOME");
const char* homedir_ = getenv("HOME");
string homedir = (homedir_ == nullptr) ? "" : homedir_;
if (homedir == "") {
// try the /etc/passwd entry
struct passwd* pwd = getpwuid(getuid());