diff --git a/CHANGELOG.md b/CHANGELOG.md index 1279560057..cb77aa9927 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,7 @@ - address: fix TypeError when sorting locations containing mixed address types @devs6186 #2195 - loader: skip PE files with unrealistically large section virtual sizes to prevent resource exhaustion @devs6186 #1989 - engine/render: fix unbounded range sentinel precedence so `count(...): N or more` uses explicit `((1 << 64) - 1)` @blenbot #2936 +- cache: support *BSD @williballenthin @res2500 #2949 ### capa Explorer Web - webui: fix 404 for "View rule in capa-rules" by using encodeURIComponent for rule name in URL @devs6186 #2482 diff --git a/capa/rules/cache.py b/capa/rules/cache.py index 1a0d0c0261..5488745c44 100644 --- a/capa/rules/cache.py +++ b/capa/rules/cache.py @@ -59,7 +59,7 @@ def get_default_cache_directory() -> Path: # MacOS: ~/Library/Caches/capa # ref: https://stackoverflow.com/a/8220141/87207 - if sys.platform == "linux" or sys.platform == "linux2": + if sys.platform.startswith(("linux", "freebsd", "openbsd", "netbsd", "dragonfly")): directory = Path(os.environ.get("XDG_CACHE_HOME", Path.home() / ".cache" / "capa")) elif sys.platform == "darwin": directory = Path.home() / "Library" / "Caches" / "capa"