diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2012-11-16 11:12:47 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2012-11-16 11:13:09 +0000 |
commit | b316ade347e389f2bec0bcc708ba5bf9a540bfdd (patch) | |
tree | a7950f38a1e856e69e43825436a2a97e048a1d67 /morphlib/builder2.py | |
parent | d4c7e23ad7373f671460a63d2250073d5a35feba (diff) | |
download | morph-b316ade347e389f2bec0bcc708ba5bf9a540bfdd.tar.gz |
Don't store original filename in compressed image files
gzip files can store the name and date of the uncompressed original, and
this is displayed in some GUI archive managers, or when gunzip -N is used.
In our case the original filename is something like 'tmpXsgaY15', which
is useless information and serves only to confuse.
Diffstat (limited to 'morphlib/builder2.py')
-rw-r--r-- | morphlib/builder2.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/morphlib/builder2.py b/morphlib/builder2.py index 674cbb17..c7d25e1a 100644 --- a/morphlib/builder2.py +++ b/morphlib/builder2.py @@ -730,7 +730,8 @@ class DiskImageBuilder(SystemKindBuilder): # pragma: no cover chatty=True) with os.fdopen(image_file_fd, "rb") as ifh: ofh = gzip.GzipFile( - fileobj=handle, mode="wb", compresslevel=1) + fileobj=handle, filename='', mode="wb", + compresslevel=1) shutil.copyfileobj(ifh, ofh, 1024 * 1024) ofh.close() |