From 6c3c7726f9ddedfff125d086240eb3a77ad16183 Mon Sep 17 00:00:00 2001 From: GloamXun Date: Wed, 2 Dec 2026 18:53:13 +0800 Subject: [PATCH] Handle the LaTeX Windows null-device size probe --- src/native_job.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/native_job.rs b/src/native_job.rs index 310c64a..a5c7d9a 100644 --- a/src/native_job.rs +++ b/src/native_job.rs @@ -1886,6 +1886,11 @@ impl SourceProvider for Files { Ok(resource) } fn file_size(&mut self, name: &str, from: &str) -> Result, String> { + // LaTeX uses this exact device name to identify Windows. It has no + // bytes or filesystem resource to capture in the project snapshot. + if cfg!(windows) && name.eq_ignore_ascii_case("nul:") { + return Ok(Some(0)); + } Ok(self .optional_tex_input(name, from)? .map(|resource| resource.version.bytes))