Skip to content

Commit b2b97b7

Browse files
committed
Fix up HOME environment variable support on macOS - only exclude containers.
1 parent f4a99ae commit b2b97b7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cups/globals.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,12 @@ cups_globals_alloc(void)
314314
if ((cg->localedir = getenv("LOCALEDIR")) == NULL)
315315
cg->localedir = CUPS_LOCALEDIR;
316316

317-
# ifndef __APPLE__ /* Sandboxing now exposes the container as the home directory */
318317
cg->home = getenv("HOME");
319-
#endif /* !__APPLE__ */
318+
319+
# ifdef __APPLE__ /* Sandboxing now exposes the container as the home directory */
320+
if (cg->home && strstr(cg->home, "/Library/Containers/"))
321+
cg->home = NULL;
322+
# endif /* !__APPLE__ */
320323
}
321324

322325
if (!cg->home)

0 commit comments

Comments
 (0)