Blame SOURCES/0006-Detailed-error-message-when-using-non-existing-TMPDI.patch

1e603a
From a69522533248093c11f11f964a3d42cb08bf7822 Mon Sep 17 00:00:00 2001
1e603a
From: Jan Kolarik <jkolarik@redhat.com>
1e603a
Date: Mon, 22 Aug 2022 08:18:04 +0200
1e603a
Subject: [PATCH] Detailed error message when using non-existing TMPDIR
1e603a
 (RhBug:2019993)
1e603a
1e603a
= changelog =
1e603a
type: bugfix
1e603a
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2019993
1e603a
---
1e603a
 librepo/util.c | 2 +-
1e603a
 1 file changed, 1 insertion(+), 1 deletion(-)
1e603a
1e603a
diff --git a/librepo/util.c b/librepo/util.c
1e603a
index 204572d..f4aa512 100644
1e603a
--- a/librepo/util.c
1e603a
+++ b/librepo/util.c
1e603a
@@ -158,7 +158,7 @@ lr_gettmpfile(void)
1e603a
     template = g_build_filename(g_get_tmp_dir(), "librepo-tmp-XXXXXX", NULL);
1e603a
     fd = mkstemp(template);
1e603a
     if (fd < 0) {
1e603a
-        perror("Cannot create temporary file - mkstemp");
1e603a
+        fprintf(stderr, "Cannot create temporary file - mkstemp '%s': %s\n", template, strerror(errno));
1e603a
         exit(1);
1e603a
     }
1e603a
     unlink(template);
1e603a
-- 
1e603a
2.37.1
1e603a