File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -183,10 +183,18 @@ impl IoProvider for MemoryIo {
183183
184184 let name = normalize_tex_path ( name) ;
185185
186- OpenResult :: Ok ( OutputHandle :: new (
187- name. to_owned ( ) ,
188- MemoryIoItem :: new ( & self . files , & name, true ) ,
189- ) )
186+ let oh = OutputHandle :: new ( name. to_owned ( ) , MemoryIoItem :: new ( & self . files , & name, true ) ) ;
187+
188+ // `hyperxmp.sty` does a thing where it tries to get today's date by
189+ // calling \filemoddate on `\jobname.log`. That essentially relies on it
190+ // being possible to \openin an \openout file that hasn't yet been
191+ // closed. I think that it's reasonable to allow that, if we just
192+ // provide null data and don't try to support intermixed reads and
193+ // writes. We have to do this after creating the MemoryIoItem since that
194+ // step removes any preexisting entry from the table of files.
195+ self . create_entry ( & name, Vec :: new ( ) ) ;
196+
197+ OpenResult :: Ok ( oh)
190198 }
191199
192200 fn output_open_stdout ( & mut self ) -> OpenResult < OutputHandle > {
You can’t perform that action at this time.
0 commit comments