Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
webui: file bundle - don't compress .gz files twice, fixes #2845
  • Loading branch information
perexg committed May 14, 2015
1 parent f3f4f1e commit bdd0eb6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion support/mkbundle
Expand Up @@ -76,7 +76,12 @@ def output_file ( path, name, idx, next = -1 ):
outf.write('static const uint8_t filebundle_data_%06d[] = {' % idx)
o = -1
d = open(p, 'rb').read()
if opts.gzip:
if p.endswith('.gz'):
t = BytesIO(d)
z = gzip.GzipFile(filename=name, mode='r', fileobj=t)
nd = z.read()
o = len(nd)
elif opts.gzip:
o = len(d)
l = opts.gzlevel
t = BytesIO()
Expand Down

0 comments on commit bdd0eb6

Please sign in to comment.