Skip to content

Commit

Permalink
problem2pdf: replace os.rename by shutil.move so that cross-filesyste…
Browse files Browse the repository at this point in the history
…m moves work

Fixes #107
  • Loading branch information
austrin committed Dec 4, 2018
1 parent 1f00492 commit 780f1fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion problemtools/problem2pdf.py
Expand Up @@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
import re
import os.path
import shutil
import sys
import string
from string import Template
Expand Down Expand Up @@ -43,7 +44,7 @@ def convert(problem, options=None):
os.chdir(origcwd)

if not options.nopdf:
os.rename(os.path.splitext(texfile)[0] + '.pdf', destfile)
shutil.move(os.path.splitext(texfile)[0] + '.pdf', destfile)

if templ != None:
templ.cleanup()
Expand Down

0 comments on commit 780f1fe

Please sign in to comment.