fix: don't detect end of tar file as broken content

Fri, 07 Dec 2018 11:17:29 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Fri, 07 Dec 2018 11:17:29 +0100
changeset 499
efd8f489d415
parent 498
37af2eac3e6a
child 500
0fe1514667e6

fix: don't detect end of tar file as broken content

dav/tar.c file | annotate | diff | comparison | revisions
--- a/dav/tar.c	Fri Nov 30 18:06:48 2018 +0100
+++ b/dav/tar.c	Fri Dec 07 11:17:29 2018 +0100
@@ -232,6 +232,9 @@
     }
     
     if(memcmp(h.magic, "ustar\0", 6)) {
+        if(!memcmp(h.magic, "\0\0\0\0", 4)) {
+            tar->error = TAR_OK;
+        }
         return NULL;
     }
     if(memcmp(h.version, "00", 2)) {

mercurial