Show More
@@ -377,8 +377,13 b' class _lazymanifest(object):' | |||||
377 | t = self.extradata[-cur - 1] |
|
377 | t = self.extradata[-cur - 1] | |
378 | l.append(self._pack(t)) |
|
378 | l.append(self._pack(t)) | |
379 | self.positions[i] = offset |
|
379 | self.positions[i] = offset | |
380 | if len(t[1]) > 20: |
|
380 | # Hashes are either 20 bytes (old sha1s) or 32 | |
381 | self.extrainfo[i] = ord(t[1][21]) |
|
381 | # bytes (new non-sha1). | |
|
382 | hlen = 20 | |||
|
383 | if len(t[1]) > 25: | |||
|
384 | hlen = 32 | |||
|
385 | if len(t[1]) > hlen: | |||
|
386 | self.extrainfo[i] = ord(t[1][hlen + 1]) | |||
382 | offset += len(l[-1]) |
|
387 | offset += len(l[-1]) | |
383 | i += 1 |
|
388 | i += 1 | |
384 | self.data = b''.join(l) |
|
389 | self.data = b''.join(l) |
General Comments 0
You need to be logged in to leave comments.
Login now