From de81d7abe43f3c2eed327b52e212bc790b406961 Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Mon, 14 Apr 2014 19:35:35 -0300 Subject: [PATCH] Bug 12081: make tmpl_process3.pl delete ts temp files This patch enable deletion of temp files used by tmpl_process3.pl. Just removed coments on existing code To test: 1. Do a count of files on /tmp ( ls /tmp | wc -l ) 2. Update preferred language 3. Count again, new files on /tmp 4. Apply the patch 5. Update again, check, no new files Signed-off-by: Mark Tompsett NOTE: I watched what temp files were actually in /tmp to make sure other processes didn't magically increase/decrease the number. $ perl translate update {lang code} generated 10 temporary files for me (2x5 po files). After removing those ten files, and applying the patch, no other files were generated. Signed-off-by: Jonathan Druart These lines has been commented by commit a399dcefad193fc21ef2dc1fe31d07686ab2da46 without any apparent good reason. Signed-off-by: Galen Charlton --- misc/translator/tmpl_process3.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/translator/tmpl_process3.pl b/misc/translator/tmpl_process3.pl index e5df69aa77..81bd3e10d2 100755 --- a/misc/translator/tmpl_process3.pl +++ b/misc/translator/tmpl_process3.pl @@ -353,8 +353,8 @@ if ($action eq 'create') { error_normal "Text extraction failed: $xgettext: $!\n", undef; error_additional "Will not run msgmerge\n", undef; } -# unlink $tmpfile1 || warn_normal "$tmpfile1: unlink failed: $!\n", undef; -# unlink $tmpfile2 || warn_normal "$tmpfile2: unlink failed: $!\n", undef; + unlink $tmpfile1 || warn_normal "$tmpfile1: unlink failed: $!\n", undef; + unlink $tmpfile2 || warn_normal "$tmpfile2: unlink failed: $!\n", undef; } elsif ($action eq 'update') { my($tmph1, $tmpfile1) = tmpnam(); @@ -386,8 +386,8 @@ if ($action eq 'create') { error_normal "Text extraction failed: $xgettext: $!\n", undef; error_additional "Will not run msgmerge\n", undef; } -# unlink $tmpfile1 || warn_normal "$tmpfile1: unlink failed: $!\n", undef; -# unlink $tmpfile2 || warn_normal "$tmpfile2: unlink failed: $!\n", undef; + unlink $tmpfile1 || warn_normal "$tmpfile1: unlink failed: $!\n", undef; + unlink $tmpfile2 || warn_normal "$tmpfile2: unlink failed: $!\n", undef; } elsif ($action eq 'install') { if(!defined($out_dir)) { -- 2.39.5