Use a short private scratch path for Windows BibTeX

This commit is contained in:
gloamxun committed 2026-12-02 19:10:40 +08:00
1 parent cd891494e9
commit c9d8ab5522
1 file changed
+8
+8
View File
@@ -482,6 +482,14 @@ struct Scratch(PathBuf);
impl Scratch {
fn new(cwd: &Path) -> io::Result<Self> {
// Kpathsea uses Win32 paths for its outputs. Its AUX/BBL filenames
// can exceed that limit under the editor's nested project run.
#[cfg(windows)]
let temporary = windows::bundled_directory()
.map(|_| std::env::temp_dir().canonicalize())
.transpose()?;
#[cfg(windows)]
let cwd = temporary.as_deref().unwrap_or(cwd);
static NEXT: AtomicU64 = AtomicU64::new(0);
let mut builder = fs::DirBuilder::new();
#[cfg(unix)]