Handle the LaTeX Windows null-device size probe
This commit is contained in:
1 parent
022c4d5712
commit
6c3c7726f9
1 file changed
+5
@@ -1886,6 +1886,11 @@ impl SourceProvider for Files {
|
|||||||
Ok(resource)
|
Ok(resource)
|
||||||
}
|
}
|
||||||
fn file_size(&mut self, name: &str, from: &str) -> Result<Option<u64>, String> {
|
fn file_size(&mut self, name: &str, from: &str) -> Result<Option<u64>, 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
|
Ok(self
|
||||||
.optional_tex_input(name, from)?
|
.optional_tex_input(name, from)?
|
||||||
.map(|resource| resource.version.bytes))
|
.map(|resource| resource.version.bytes))
|
||||||
|
|||||||
Reference in new issue
Block a user