diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2016-12-13 11:38:00 +0100 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2016-12-14 10:44:56 +0000 |
commit | d2c2388c43e8430c18d26af2a5d26ab58b629675 (patch) | |
tree | ee8d28c879bca138d9903581cc22146643ae4e94 /solenv | |
parent | 5a7e754fa9ca42fb673f240563cdcc1bf2aef006 (diff) |
Don't leak .png files into tmp
Temp directory created by copy_images (which contains copies of .png files
from any given icon-themes folder) was left behind. Happening at least since
commit 4e3dc8c141c2efd037c1f214b5edff071812b6a8
Date: Fri Jun 3 17:09:14 2016 +0200
remove use of Archive::Zip
With packimages.pl now used to package also screenshot images (in
multiple languages), tmp fills up quickly. This is fatal on Windows
Change-Id: Ie35c33277a80ed9085815f30b846bb97a365afb1
Reviewed-on: https://gerrit.libreoffice.org/31947
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'solenv')
-rwxr-xr-x | solenv/bin/packimages.pl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/solenv/bin/packimages.pl b/solenv/bin/packimages.pl index fb141c03c420..16f39f4e2ac9 100755 --- a/solenv/bin/packimages.pl +++ b/solenv/bin/packimages.pl @@ -28,7 +28,7 @@ use Getopt::Long; use File::Find; use File::Basename; use File::Copy qw(copy); -use File::Path qw(make_path); +use File::Path qw(make_path rmtree); require File::Temp; use File::Temp qw(tempdir); @@ -99,6 +99,9 @@ if ( $do_rebuild == 1 ) { create_zip_archive($zip_hash_ref, \%links, $tmpdir); replace_file($tmp_out_file, $out_file); print_message("packing $out_file finished.") if $verbose; + + rmtree($tmpdir); + print_error("failed to delete $tmpdir") if -e $tmpdir; } else { print_message("$out_file up to date. nothing to do.") if $verbose; } |