From 24288a6dcb4a0e05ef1afd51d161b289b9862fe9 Mon Sep 17 00:00:00 2001 From: Matthieu Moy Date: Wed, 26 Jun 2019 19:09:14 +0200 Subject: [PATCH] cd to the right directory when looking for the PDF file --- git-latexdiff | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/git-latexdiff b/git-latexdiff index cae75c9..f787289 100755 --- a/git-latexdiff +++ b/git-latexdiff @@ -759,6 +759,8 @@ fi verbose "Compiling result" compile_error=0 + +oldPWD=$PWD cd new/"$maindir" || die "Can't cd to new/$maindir" if test -f Makefile && test "$ignoremake" != 1 ; then log_cmd make.log make || { @@ -790,6 +792,11 @@ else error_msg="command 'pdflatex' (third run) failed." } fi +cd "$oldPWD" + +# Same relative path as where we've been called from, but in the +# temporary new/ directory: +cd new/"$git_prefix" verbose_done