##// END OF EJS Templates
vfs: allow to pass more argument to audit...
Boris Feld -
r33435:456626e9 default
parent child Browse files
Show More
@@ -46,7 +46,7 b' class pathauditor(object):'
46 else:
46 else:
47 self.normcase = lambda x: x
47 self.normcase = lambda x: x
48
48
49 def __call__(self, path):
49 def __call__(self, path, mode=None):
50 '''Check the relative path.
50 '''Check the relative path.
51 path may contain a pattern (e.g. foodir/**.txt)'''
51 path may contain a pattern (e.g. foodir/**.txt)'''
52
52
@@ -306,7 +306,7 b' class vfs(abstractvfs):'
306 if audit:
306 if audit:
307 self.audit = pathutil.pathauditor(self.base)
307 self.audit = pathutil.pathauditor(self.base)
308 else:
308 else:
309 self.audit = util.always
309 self.audit = (lambda path, mode=None: True)
310 self.createmode = None
310 self.createmode = None
311 self._trustnlink = None
311 self._trustnlink = None
312
312
@@ -360,7 +360,7 b' class vfs(abstractvfs):'
360 r = util.checkosfilename(path)
360 r = util.checkosfilename(path)
361 if r:
361 if r:
362 raise error.Abort("%s: %r" % (r, path))
362 raise error.Abort("%s: %r" % (r, path))
363 self.audit(path)
363 self.audit(path, mode=mode)
364 f = self.join(path)
364 f = self.join(path)
365
365
366 if not text and "b" not in mode:
366 if not text and "b" not in mode:
General Comments 0
You need to be logged in to leave comments. Login now