summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2023-12-17 19:20:25 +0100
committerTomas Bzatek <tbzatek@redhat.com>2023-12-17 19:20:25 +0100
commit4e17c2527b106f1b493a3ac77c89858d14f834e2 (patch)
treed8b8ad6c9160ac2b5b1918c3ab0ffc06aecdf5bf
parent21434dedc4212121d4399f9880293f6cedf1cc52 (diff)
downloadtuxcmd-modules-4e17c2527b106f1b493a3ac77c89858d14f834e2.tar.xz
libarchive: Prevent overwriting GError
-rw-r--r--libarchive/libarchive.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libarchive/libarchive.c b/libarchive/libarchive.c
index 96b0956..26efa85 100644
--- a/libarchive/libarchive.c
+++ b/libarchive/libarchive.c
@@ -856,7 +856,8 @@ VFSCopyToLocal (struct TVFSGlobs *globs, const char *sSrcName, const char *sDstN
if (! found && res) {
fprintf (stderr, "(EE) VFSCopyToLocal: file not found in archive.\n");
- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND, "File not found in archive.");
+ if (error && *error == NULL)
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND, "File not found in archive.");
res = FALSE;
}