Skip to content

Commit

Permalink
Bug 464080 Lock .jar files before opening them r=Pike
Browse files Browse the repository at this point in the history
CLOSED TREE
  • Loading branch information
Neil Rashbrook committed Nov 24, 2008
1 parent b708adb commit 0b54959
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions config/MozZipFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ class ZipFile(zipfile.ZipFile):
"""
def __init__(self, file, mode="r", compression=zipfile.ZIP_STORED,
lock = False):
zipfile.ZipFile.__init__(self, file, mode, compression)
self._remove = []
self.end = self.fp.tell()
self.debug = 0
if lock:
assert isinstance(file, basestring)
self.lockfile = lockFile(file + '.lck')
else:
self.lockfile = None
zipfile.ZipFile.__init__(self, file, mode, compression)
self._remove = []
self.end = self.fp.tell()
self.debug = 0

def writestr(self, zinfo_or_arcname, bytes):
"""Write contents into the archive.
Expand Down

0 comments on commit 0b54959

Please sign in to comment.