From 69e5efc0c1860d957dea96b26a3cbb765312c277 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Fri, 3 Oct 2025 14:16:33 -0700 Subject: [PATCH] Remove some unnecessary use of `Path.resolve()`. NFC It looks like this was first introduced in #17102 as a replacement for `os.path.normpath`, but its not actually same thing `os.path.normpath` does not resolve symlinks. Apparently resolving symlinks can actually cause crashes on windows in some cases. See #25463. Fixes: #25463 --- site/source/conf.py | 2 +- tools/cache.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/site/source/conf.py b/site/source/conf.py index 942d7cee48125..a4d3d3dd2fe67 100644 --- a/site/source/conf.py +++ b/site/source/conf.py @@ -97,7 +97,7 @@ # |version| and |release|, also used in various other places throughout the # built documents. # -version_path = Path(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'emscripten-version.txt').resolve() +version_path = Path(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'emscripten-version.txt') emscripten_version = version_path.read_text().strip().strip('"') # The short X.Y version. diff --git a/tools/cache.py b/tools/cache.py index e87f733ca3508..01f8a6247735a 100644 --- a/tools/cache.py +++ b/tools/cache.py @@ -194,7 +194,7 @@ def get(shortname, creator, what=None, force=False, quiet=False): def setup(): global cachedir, cachelock, cachelock_name # figure out the root directory for all caching - cachedir = Path(config.CACHE).resolve() + cachedir = Path(config.CACHE) # since the lock itself lives inside the cache directory we need to ensure it # exists.