Resolve TeX inputs with the default suffix alternatives
This commit is contained in:
1 parent
901a50c36c
commit
ee22f25ee0
5 files changed
+204
-10
No files matched your search
+4
-3
@@ -1483,7 +1483,8 @@ impl SourceProvider for Files {
|
||||
self.emit_diagnostic(WriteDestination::TerminalOnly, terminal, false)
|
||||
}
|
||||
fn read(&mut self, name: &str, from: &str) -> Result<SourceFile, String> {
|
||||
let resource = self.resource(ResourceKind::Tex, name, from)?;
|
||||
let resource = self.world.read_tex_input(name, Path::new(from))?;
|
||||
self.observe_resource(ResourceKind::Tex, &resource);
|
||||
let path = resource.version.path;
|
||||
Ok(SourceFile {
|
||||
name: path.display().to_string(),
|
||||
@@ -1512,7 +1513,7 @@ impl SourceProvider for Files {
|
||||
fn file_size(&mut self, name: &str, from: &str) -> Result<Option<u64>, String> {
|
||||
let Some(resource) = self
|
||||
.world
|
||||
.read_optional(ResourceKind::Tex, name, Path::new(from))?
|
||||
.read_tex_input_optional(name, Path::new(from))?
|
||||
else {
|
||||
return Ok(None);
|
||||
};
|
||||
@@ -1527,7 +1528,7 @@ impl SourceProvider for Files {
|
||||
let result = (|| -> Result<Option<InputOpened>, String> {
|
||||
let Some(path) = self
|
||||
.world
|
||||
.resolve(ResourceKind::Tex, name, Path::new(from))?
|
||||
.resolve_tex_input(name, Path::new(from))?
|
||||
else {
|
||||
return Ok(None);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user