Fix issue with overwriting files on Windows.

This commit is contained in:
Holt59 2018-07-07 12:31:58 +02:00
parent efe47274cb
commit 193763a82a

View File

@ -161,7 +161,7 @@ class documentclass(element):
if compile_twice: if compile_twice:
res = subprocess.call(call, stdout=outlog) res = subprocess.call(call, stdout=outlog)
if res == 0: if res == 0:
os.rename( os.replace(
os.path.join( os.path.join(
output_aux_folder, outfile + '.pdf'), output_aux_folder, outfile + '.pdf'),
os.path.join(outdir, outfile + '.pdf')) os.path.join(outdir, outfile + '.pdf'))