diff mercurial/archival.py @ 18344:87923db0ecff

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.
author Mads Kiilerich <mads@kiilerich.com>
date Tue, 15 Jan 2013 01:05:12 +0100
parents 16c642a6f07d
children 6252b4f1c4b4
line wrap: on
line diff
--- 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):