diff options
author | Lars Gustäbel <lars@gustaebel.de> | 2011-12-06 12:00:58 (GMT) |
---|---|---|
committer | Lars Gustäbel <lars@gustaebel.de> | 2011-12-06 12:00:58 (GMT) |
commit | 45fb08218069ec5589c8595cc34d111846ce016d (patch) | |
tree | b3abcc83280048113e595e9b1158e7ef49775321 /Lib/tarfile.py | |
parent | 04f6974d84e8054e0aafe5bceef8d5dca14a65d5 (diff) | |
parent | ed1ac587df34dc30ddd49549d3286befb059dd31 (diff) | |
download | cpython-45fb08218069ec5589c8595cc34d111846ce016d.zip cpython-45fb08218069ec5589c8595cc34d111846ce016d.tar.gz cpython-45fb08218069ec5589c8595cc34d111846ce016d.tar.bz2 |
Merge with 3.2: Correctly detect bzip2 compressed streams with blocksizes other than 900k.
Diffstat (limited to 'Lib/tarfile.py')
-rw-r--r-- | Lib/tarfile.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py index cf4e164..c185954 100644 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -624,7 +624,7 @@ class _StreamProxy(object): def getcomptype(self): if self.buf.startswith(b"\037\213\010"): return "gz" - if self.buf.startswith(b"BZh91"): + if self.buf[0:3] == b"BZh" and self.buf[4:10] == b"1AY&SY": return "bz2" return "tar" |