Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/libarchive/dist/libarchive PR/55568: Andreas Gu...



details:   https://anonhg.NetBSD.org/src/rev/550f63797e46
branches:  trunk
changeset: 937284:550f63797e46
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Aug 14 14:42:44 2020 +0000

description:
PR/55568: Andreas Gustafsson: Set the error when failing to create a temp file.

diffstat:

 external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (16 lines):

diff -r 3873ad866147 -r 550f63797e46 external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c
--- a/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c        Fri Aug 14 13:45:44 2020 +0000
+++ b/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c        Fri Aug 14 14:42:44 2020 +0000
@@ -2184,8 +2184,11 @@
                        if ((a->flags & ARCHIVE_EXTRACT_ATOMIC) &&
                            S_ISREG(a->st.st_mode)) {
                                /* Use a temporary file to extract */
-                               if ((a->fd = la_mktemp(a)) == -1)
+                               if ((a->fd = la_mktemp(a)) == -1) {
+                                       archive_set_error(&a->archive, en,
+                                           "Can't create '%s'", a->name);
                                        return ARCHIVE_FAILED;
+                               }
                                a->pst = NULL;
                                en = 0;
                        } else {



Home | Main Index | Thread Index | Old Index