From fafd35a775cca9877c99d4e094b0dcf46fd5a38e Mon Sep 17 00:00:00 2001 From: oyaah Date: Sun, 7 Jun 2026 01:49:50 +0530 Subject: [PATCH] Fix fontconfig path typo to fix FileNotFoundError on Linux --- pythonlib/camoufox/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pythonlib/camoufox/utils.py b/pythonlib/camoufox/utils.py index f95fbdb..cde6f47 100644 --- a/pythonlib/camoufox/utils.py +++ b/pythonlib/camoufox/utils.py @@ -103,14 +103,14 @@ def get_env_vars( if OS_NAME == 'lin': # https://github.com/coryking/camoufox/commit/f21eeb2850a74cc104fb57e17e0a2fa27b7a2a28 # Thanks @coryking - # the user_agent_os is either 'lin', 'mac', or 'win' but our fontconfigs directory is 'linux', 'macos', or 'windows' + # the user_agent_os is either 'lin', 'mac', or 'win' but our fontconfig directory is 'linux', 'macos', or 'windows' directory_map = { 'lin': 'linux', 'mac': 'macos', 'win': 'windows', } os_dir = directory_map.get(user_agent_os, user_agent_os) - fontconfig_path = get_path(os.path.join("fontconfigs", os_dir)) + fontconfig_path = get_path(os.path.join("fontconfig", os_dir)) # assert that fonts.conf exists in the directory if not os.path.exists(os.path.join(fontconfig_path, "fonts.conf")):