session: Remove log message for missing environment.d

Not having an environment.d directory is a normal case, so no log message is needed. Additionally, rename no_dir_cleanup to env_dir_cleanup.

I was confusing log messages with feature discovery.
This commit is contained in:
Scarcely There 2024-03-13 08:32:43 -05:00 committed by GitHub
parent 55066b995d
commit 17114152cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -118,18 +118,14 @@ read_environment_dir(const char *path_prefix)
DIR *envdir = opendir(path); DIR *envdir = opendir(path);
if (!envdir) { if (!envdir) {
if (errno == ENOENT) { if (errno != ENOENT) {
wlr_log(WLR_INFO,
"no %s.d directory found",
path_prefix);
} else {
const char *err_msg = strerror(errno); const char *err_msg = strerror(errno);
wlr_log(WLR_INFO, wlr_log(WLR_INFO,
"failed to read environment directory: %s", "failed to read environment directory: %s",
err_msg ? err_msg : "reason unknown"); err_msg ? err_msg : "reason unknown");
} }
goto no_dir_cleanup; goto env_dir_cleanup;
} }
struct dirent *dirent; struct dirent *dirent;
@ -148,7 +144,7 @@ read_environment_dir(const char *path_prefix)
closedir(envdir); closedir(envdir);
no_dir_cleanup: env_dir_cleanup:
free(path); free(path);
return success; return success;
} }