Fix comment in getHome
The logic in the comment is the opposite of the truth.
Change-Id: I64add84539209782ffa46431f3db1fb306d90b3f
This commit is contained in:
parent
c5949bfe31
commit
fabc9f29b8
|
@ -36,7 +36,7 @@ Path getHome()
|
||||||
std::optional<std::string> unownedUserHomeDir = {};
|
std::optional<std::string> unownedUserHomeDir = {};
|
||||||
auto homeDir = getEnv("HOME");
|
auto homeDir = getEnv("HOME");
|
||||||
if (homeDir) {
|
if (homeDir) {
|
||||||
// Only use $HOME if doesn't exist or is owned by the current user.
|
// Only use `$HOME` if it exists and is owned by the current user.
|
||||||
struct stat st;
|
struct stat st;
|
||||||
int result = stat(homeDir->c_str(), &st);
|
int result = stat(homeDir->c_str(), &st);
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
|
|
Loading…
Reference in a new issue