From fabc9f29b82df97ab3b378dafb8249354f54d1df Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Fri, 23 Aug 2024 15:15:21 -0700 Subject: [PATCH] Fix comment in `getHome` The logic in the comment is the opposite of the truth. Change-Id: I64add84539209782ffa46431f3db1fb306d90b3f --- src/libutil/users.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libutil/users.cc b/src/libutil/users.cc index a9a8a7353..ce36bad9b 100644 --- a/src/libutil/users.cc +++ b/src/libutil/users.cc @@ -36,7 +36,7 @@ Path getHome() std::optional unownedUserHomeDir = {}; auto homeDir = getEnv("HOME"); 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; int result = stat(homeDir->c_str(), &st); if (result != 0) {