Show More
@@ -255,10 +255,10 b' class vfs(abstractvfs):' | |||||
255 | def _cansymlink(self): |
|
255 | def _cansymlink(self): | |
256 | return util.checklink(self.base) |
|
256 | return util.checklink(self.base) | |
257 |
|
257 | |||
258 |
def _fixfilemode(self, |
|
258 | def _fixfilemode(self, fp): | |
259 | if self.createmode is None: |
|
259 | if self.createmode is None: | |
260 | return |
|
260 | return | |
261 |
os.chmod( |
|
261 | os.fchmod(fp.fileno(), self.createmode & 0666) | |
262 |
|
262 | |||
263 | def __call__(self, path, mode="r", text=False, atomictemp=False): |
|
263 | def __call__(self, path, mode="r", text=False, atomictemp=False): | |
264 | if self._audit: |
|
264 | if self._audit: | |
@@ -305,7 +305,7 b' class vfs(abstractvfs):' | |||||
305 | util.rename(util.mktempcopy(f), f) |
|
305 | util.rename(util.mktempcopy(f), f) | |
306 | fp = util.posixfile(f, mode) |
|
306 | fp = util.posixfile(f, mode) | |
307 | if nlink == 0: |
|
307 | if nlink == 0: | |
308 | self._fixfilemode(f) |
|
308 | self._fixfilemode(fp) | |
309 | return fp |
|
309 | return fp | |
310 |
|
310 | |||
311 | def symlink(self, src, dst): |
|
311 | def symlink(self, src, dst): | |
@@ -329,8 +329,8 b' class vfs(abstractvfs):' | |||||
329 | else: |
|
329 | else: | |
330 | f = self(dst, "w") |
|
330 | f = self(dst, "w") | |
331 | f.write(src) |
|
331 | f.write(src) | |
|
332 | self._fixfilemode(f) | |||
332 | f.close() |
|
333 | f.close() | |
333 | self._fixfilemode(dst) |
|
|||
334 |
|
334 | |||
335 | def audit(self, path): |
|
335 | def audit(self, path): | |
336 | self.auditor(path) |
|
336 | self.auditor(path) |
General Comments 0
You need to be logged in to leave comments.
Login now