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