##// END OF EJS Templates
opener: add self._audit (issue2862)
Adrian Buehlmann -
r14720:36283a7b stable
parent child Browse files
Show More
@@ -169,6 +169,7 b' class opener(abstractopener):'
169 169 '''
170 170 def __init__(self, base, audit=True):
171 171 self.base = base
172 self._audit = audit
172 173 if audit:
173 174 self.auditor = pathauditor(base)
174 175 else:
@@ -186,9 +187,10 b' class opener(abstractopener):'
186 187 os.chmod(name, self.createmode & 0666)
187 188
188 189 def __call__(self, path, mode="r", text=False, atomictemp=False):
189 r = util.checkosfilename(path)
190 if r:
191 raise util.Abort("%s: %r" % (r, path))
190 if self._audit:
191 r = util.checkosfilename(path)
192 if r:
193 raise util.Abort("%s: %r" % (r, path))
192 194 self.auditor(path)
193 195 f = os.path.join(self.base, path)
194 196
General Comments 0
You need to be logged in to leave comments. Login now