зеркало из https://github.com/mozilla/gecko-dev.git
Bug 464080 Lock .jar files before opening them r=Pike
CLOSED TREE
This commit is contained in:
Родитель
951dd158dd
Коммит
632daa248b
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче