Control: tags -1 + confirmed patch

commit 59c3b1180f0efa2708d543799798f6e38945cc85
Author: Nick Lott <n...@brokentoaster.com>
Date:   Sun Nov 10 00:20:19 2024 +0000

    Update to use perl tempfile function.

 sub TempFile {
-    $cmd  = "mktemp --tmpdir";
-    $cmd .= " ${head}XXXXXXXXXX" if $head;
-    $cmd .= " --suffix $tail" if $tail;
-    $tmpfile = `$cmd`;
+    my($fh, $filename) = tempfile(
+        TEMPLATE => $head . 'XXXXXXXXX',
+        SUFFIX   => $tail
+    );

This clearly wants to have
  TMPDIR => 1
as well.

Patch below and in
  https://salsa.debian.org/debian/mailcap/-/merge_requests/11
From 67499693bb5caef572415bbe1f3bad1ca0df3c9e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= <nabijaczlew...@nabijaczleweli.xyz>
Date: Mon, 11 Nov 2024 22:06:44 +0100
Subject: [PATCH] Make temporary file in $TMPDIR again (Closes: #1087340)
X-Mutt-PGP: OS

---
 run-mailcap | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/run-mailcap b/run-mailcap
index 92ed91a..ee55f19 100755
--- a/run-mailcap
+++ b/run-mailcap
@@ -142,7 +142,8 @@ sub TempFile {
     
     my($fh, $filename) = tempfile(
         TEMPLATE => $head . 'XXXXXXXXX', 
-        SUFFIX   => $tail 
+        SUFFIX   => $tail,
+        TMPDIR   => 1
     );
 
     chmod(0600, $fh);
-- 
2.39.5

Attachment: signature.asc
Description: PGP signature

Reply via email to