archival: tarit should never close the dest passed to it
authorMads Kiilerich <mads@kiilerich.com>
Tue, 15 Jan 2013 01:05:12 +0100
changeset 18344 87923db0ecff
parent 18343 cfa731b45b75
child 18345 590056e0ec2f
archival: tarit should never close the dest passed to it Some archive types closed the open file passed to it, some didn't. This could cause either missing or duplicate close and cause problems in hgweb. The fix in 14f3795a5ed7 should only have closed the compressors and archivers - not the underlying file itself if no compressor is used.
mercurial/archival.py
--- a/mercurial/archival.py	Tue Jan 15 01:05:12 2013 +0100
+++ b/mercurial/archival.py	Tue Jan 15 01:05:12 2013 +0100
@@ -106,7 +106,6 @@
                 self.fileobj = gzfileobj
                 return tarfile.TarFile.taropen(name, mode, gzfileobj)
             else:
-                self.fileobj = fileobj
                 return tarfile.open(name, mode + kind, fileobj)
 
         if isinstance(dest, str):