---
 texmf-dist/scripts/texlive/fmtutil.sh |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- texlive-base-jessie.git.orig/texmf-dist/scripts/texlive/fmtutil.sh
+++ texlive-base-jessie.git/texmf-dist/scripts/texlive/fmtutil.sh
@@ -785,7 +785,6 @@
       log_warning "\`$engine -ini $tcxflag $jobswitch $prgswitch $texargs' possibly failed."
 
     # We don't want user-interaction for the following "mv" commands:
-    mv "$format.log" "$fulldestdir/$format.log" </dev/null
     #
     destfile=$fulldestdir/$fmtfile
     if mv "$fmtfile" "$destfile" </dev/null; then
@@ -824,6 +823,9 @@
   else
     log_failure "\`$engine -ini $tcxflag $jobswitch $prgswitch $texargs' failed"
   fi
+  rm -f "$fulldestdir/$format.log"
+  # We don't want user-interaction for the following "mv" command:
+  mv "$format.log" "$fulldestdir/$format.log" </dev/null
 }
 
 ###############################################################################
