diff options
author | Moonchild <moonchild@palemoon.org> | 2020-11-14 01:03:27 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-11-18 10:58:48 +0000 |
commit | 8b3375e2c202c04935ca056cc8dc389a08e47bb6 (patch) | |
tree | 6dbbbdfd28f5b70f7d9b7fad0af7a8fee7e5019f /python/mozbuild/mozpack/packager/unpack.py | |
parent | 8fefeee3c3e4ff5195a98496c3855d8aabce4ffa (diff) | |
download | UXP-8b3375e2c202c04935ca056cc8dc389a08e47bb6.tar UXP-8b3375e2c202c04935ca056cc8dc389a08e47bb6.tar.gz UXP-8b3375e2c202c04935ca056cc8dc389a08e47bb6.tar.lz UXP-8b3375e2c202c04935ca056cc8dc389a08e47bb6.tar.xz UXP-8b3375e2c202c04935ca056cc8dc389a08e47bb6.zip |
[packager] Optimize archive accesses.
Diffstat (limited to 'python/mozbuild/mozpack/packager/unpack.py')
-rw-r--r-- | python/mozbuild/mozpack/packager/unpack.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/python/mozbuild/mozpack/packager/unpack.py b/python/mozbuild/mozpack/packager/unpack.py index fa2b474e7..515705c0d 100644 --- a/python/mozbuild/mozpack/packager/unpack.py +++ b/python/mozbuild/mozpack/packager/unpack.py @@ -54,7 +54,7 @@ class UnpackFinder(BaseFinder): self.omnijar = None self.jarlogs = {} self.optimizedjars = False - self.compressed = True + self.compressed = False jars = set() @@ -146,8 +146,7 @@ class UnpackFinder(BaseFinder): jar = JarReader(fileobj=file.open()) if jar.is_optimized: self.optimizedjars = True - if not any(f.compressed for f in jar): - self.compressed = False + self.compressed = max(self.compressed, jar.compression) if jar.last_preloaded: jarlog = jar.entries.keys() self.jarlogs[path] = jarlog[:jarlog.index(jar.last_preloaded) + 1] |