mirror of
https://github.com/daijro/camoufox.git
synced 2026-08-19 00:00:58 +00:00
Fix fontconfig path typo to fix FileNotFoundError on Linux
This commit is contained in:
@@ -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")):
|
||||
|
||||
Reference in New Issue
Block a user