Packs: an untouched vanilla directory is mirrored on Windows too (#1688)

link cannot symlink a directory on Windows, so mirror has to recurse into one
itself, but it only did so when a pack had filters. An untouched directory fell
through to the link branch and vanished from the overlay, which took
textures/font and the panorama with it and made a pack that overrides a font
crash the client before its window.
This commit is contained in:
Alexander Krylov
2026-10-25 03:57:00 +03:00
parent 947d65e64d
commit 6d1f6965d2
+5 -1
View File
@@ -517,7 +517,11 @@ fn build_overlay_uncached(
}
}
} else if touched.contains(&child)
|| (vanilla.join(&child).is_dir() && !filters.is_empty())
// Windows cannot link a directory the way unix does (`link` above), so an
// untouched one has to be mirrored: skipping it hid textures/font and the
// title panorama from the overlay, and a font json that names those sheets
// then failed to load (#1688).
|| (vanilla.join(&child).is_dir() && (cfg!(not(unix)) || !filters.is_empty()))
{
mirror(
&child,