def _update(self, remove=[]):
        """create a new zipfile with some changes"""
        nzfp = os.path.join(tempfile.gettempdir(), "tempzip_{t}.zip".format(t=time.time()))
        op = self.zf.fp.name
        pswd = self.zf.pwd
        comment = self.zf.comment
        nzf = zipfile.ZipFile(nzfp, "w", self.zf.compression, True)
        infos = self.zf.infolist()
        for zipinfo in infos:
            add = True
            for rm in remove:
                if zipinfo.filename.startswith(rm):
                    add = False
                    break
            if not add:
                continue
            ofo = self.zf.open(zipinfo)
            nzf.writestr(zipinfo, ofo.read())
        self.zf.close()
        os.remove(op)
        nzf.close()
        shutil.copy(nzfp, op)
        self.zf = zipfile.ZipFile(op, "a", zipfile.ZIP_DEFLATED, True)
        self.zf.setpassword(pswd)
        self.zf.comment = comment
create a new zipfile with some changes
lib/stashutils/fsi/zip.py