(blobs) with comments, per bug #2727 from Konstantin Pelepelin.
Mea culpa for not having tested this case.
Back-patch to 8.1; prior branches don't dump blob comments at all.
lclContext *ctx = (lclContext *) AH->formatData;
TAR_MEMBER *th;
size_t cnt;
+ bool foundBlob = false;
char buf[4096];
StartRestoreBlobs(AH);
ahwrite(buf, 1, cnt, AH);
}
EndRestoreBlob(AH, oid);
+ foundBlob = true;
}
+ tarClose(AH, th);
+ }
+ else
+ {
+ tarClose(AH, th);
+ /*
+ * Once we have found the first blob, stop at the first
+ * non-blob entry (which will be 'blobs.toc'). This coding would
+ * eat all the rest of the archive if there are no blobs ... but
+ * this function shouldn't be called at all in that case.
+ */
+ if (foundBlob)
+ break;
}
-
- tarClose(AH, th);
th = tarOpen(AH, NULL, 'r');
}