From 8798e725a1902eb5d5ea42e3259f96ea386531aa Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 3 Mar 2019 21:52:59 +0000 Subject: update TLPOBJ with changes from Johannes Hielscher git-svn-id: svn://tug.org/texlive/trunk@50211 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLPOBJ.pm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Master/tlpkg/TeXLive/TLPOBJ.pm') diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm index 5a84b3697d0..55ead17b769 100644 --- a/Master/tlpkg/TeXLive/TLPOBJ.pm +++ b/Master/tlpkg/TeXLive/TLPOBJ.pm @@ -736,9 +736,13 @@ sub make_container { tlwarn("$0: Couldn't compress $destdir/$tarname\n"); return (0,0, ""); } - # make sure we remove the original tar since lc does not - # automatically remove it - unlink("$destdir/$tarname") if (-r "$destdir/$tarname"); + # make sure we remove the original tar since old lz4 versions + # cannot automatically delete it. + # We remove the tar file only when the compressed file was + # correctly created, something that should only happen in the + # most strange cases. + unlink("$destdir/$tarname") + if ((-r "$destdir/$tarname") && (-r "$destdir/$containername")); } else { tlwarn("$0: Couldn't find $destdir/$tarname to run $compressor\n"); return (0, 0, ""); -- cgit v1.2.3