equal
deleted
inserted
replaced
227 ''' |
227 ''' |
228 def __init__(self, base, audit=True, expand=False): |
228 def __init__(self, base, audit=True, expand=False): |
229 if expand: |
229 if expand: |
230 base = os.path.realpath(util.expandpath(base)) |
230 base = os.path.realpath(util.expandpath(base)) |
231 self.base = base |
231 self.base = base |
232 self.basesep = self.base + os.sep |
|
233 self._setmustaudit(audit) |
232 self._setmustaudit(audit) |
234 self.createmode = None |
233 self.createmode = None |
235 self._trustnlink = None |
234 self._trustnlink = None |
236 |
235 |
237 def _getmustaudit(self): |
236 def _getmustaudit(self): |
330 def audit(self, path): |
329 def audit(self, path): |
331 self.auditor(path) |
330 self.auditor(path) |
332 |
331 |
333 def join(self, path): |
332 def join(self, path): |
334 if path: |
333 if path: |
335 return path.startswith('/') and path or (self.basesep + path) |
334 return os.path.join(self.base, path) |
336 return self.base |
335 else: |
|
336 return self.base |
337 |
337 |
338 opener = vfs |
338 opener = vfs |
339 |
339 |
340 class filtervfs(abstractvfs): |
340 class filtervfs(abstractvfs): |
341 '''Wrapper vfs for filtering filenames with a function.''' |
341 '''Wrapper vfs for filtering filenames with a function.''' |