Skip to content

Commit

Permalink
Check for symlink.
Browse files Browse the repository at this point in the history
  • Loading branch information
am009 committed May 9, 2024
1 parent 82bd51d commit 514769e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/latexdiff_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ def do_latex_diff(old_proj_zip: FileStorage, new_proj_zip: FileStorage, config:
finally:
subprocess.run(f"docker stop -t 5 {container_name}".split(' '), stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
diff_pdf = None
if os.path.exists(os.path.join(tempdir, "diff.pdf")):
diff_pdf_path = os.path.join(tempdir, "diff.pdf")
if os.path.exists(diff_pdf_path) and os.path.isfile(diff_pdf_path) and not os.path.islink(diff_pdf_path):
diff_pdf = os.path.join(tempdir, "diff.pdf")
diff_pdf = file2b64(diff_pdf)
if download_diff_proj:
Expand Down

0 comments on commit 514769e

Please sign in to comment.