equal
deleted
inserted
replaced
131 self.date_time = time.gmtime(mtime)[:6] |
131 self.date_time = time.gmtime(mtime)[:6] |
132 |
132 |
133 def addfile(self, name, mode, data): |
133 def addfile(self, name, mode, data): |
134 i = zipfile.ZipInfo(self.prefix + name, self.date_time) |
134 i = zipfile.ZipInfo(self.prefix + name, self.date_time) |
135 i.compress_type = self.z.compression |
135 i.compress_type = self.z.compression |
136 i.flag_bits = 0x08 |
|
137 # unzip will not honor unix file modes unless file creator is |
136 # unzip will not honor unix file modes unless file creator is |
138 # set to unix (id 3). |
137 # set to unix (id 3). |
139 i.create_system = 3 |
138 i.create_system = 3 |
140 i.external_attr = (mode | stat.S_IFREG) << 16L |
139 i.external_attr = (mode | stat.S_IFREG) << 16L |
141 self.z.writestr(i, data) |
140 self.z.writestr(i, data) |