From 9084eacd7f25e9b6f405dbd083cb3af16d03eff6 Mon Sep 17 00:00:00 2001 From: Sam Sung <51686767+samwhosung@users.noreply.github.com> Date: Sun, 1 Nov 2026 02:05:45 +0700 Subject: [PATCH] The loose-source test builds on Windows, its unreadable file unix-only (#2921) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `the_loose_source_falls_through_per_candidate` made a file unreadable through `std::os::unix`'s `PermissionsExt` with no `cfg(unix)`, so the Windows test build failed and no test ran there. The permission calls are now unix-only. Elsewhere the file stays readable, and the test already skips its second assertion in that case. A cross-check of every workspace test for `x86_64-pc-windows-gnu` finds no other break. Fixes #2916 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5.5 --- crates/benilla-assets/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/benilla-assets/src/lib.rs b/crates/benilla-assets/src/lib.rs index 4d3ac9c75..3a0f4f980 100644 --- a/crates/benilla-assets/src/lib.rs +++ b/crates/benilla-assets/src/lib.rs @@ -548,6 +548,7 @@ mod tests { /// the `.blp`, and a loose file that will not open falls to the next candidate. #[test] fn the_loose_source_falls_through_per_candidate() { + #[cfg(unix)] use std::os::unix::fs::PermissionsExt; let data = benilla_formats::wow_data_or_skip!(); let install = @@ -566,6 +567,9 @@ mod tests { good_tga[16] = 32; std::fs::write(dir.join("b.tga"), &good_tga).unwrap(); std::fs::write(dir.join("b.blp"), b"BLP2-b").unwrap(); + // Unreadable by mode on unix alone; elsewhere the `.blp` stays readable and the second + // half's assertion is skipped below. + #[cfg(unix)] std::fs::set_permissions(dir.join("b.blp"), std::fs::Permissions::from_mode(0o000)) .unwrap(); let root = install.clone(); @@ -593,6 +597,7 @@ mod tests { ); let got = read(&texture_url("zzfall\\b", (true, true))); let readable = std::fs::read(dir.join("b.blp")).is_ok(); + #[cfg(unix)] let _ = std::fs::set_permissions(dir.join("b.blp"), std::fs::Permissions::from_mode(0o600)); let _ = std::fs::remove_dir_all(&install); if !readable {