diff --git a/git-latexdiff b/git-latexdiff index dac37e0..e1e6d1a 100755 --- a/git-latexdiff +++ b/git-latexdiff @@ -466,6 +466,10 @@ if test -z "$main" ; then fi fi +if test ! -r "$main" ; then + die "Cannot read $main." +fi + ext=${main##*\.} case "$ext" in Rnw) check_knitr ;; @@ -474,10 +478,6 @@ case "$ext" in *) ;; esac -if test ! -r "$main" ; then - die "Cannot read $main." -fi - verbose "Creating temporary directories" git_prefix=$(git rev-parse --show-prefix)