##// END OF EJS Templates
pathauditor: switch normcase logic according to case sensitivity of filesystem...
FUJIWARA Katsunori -
r15666:37a6e976 stable
parent child Browse files
Show More
@@ -76,12 +76,16 b' class pathauditor(object):'
76 self.auditeddir = set()
76 self.auditeddir = set()
77 self.root = root
77 self.root = root
78 self.callback = callback
78 self.callback = callback
79 if os.path.lexists(root) and not util.checkcase(root):
80 self.normcase = util.normcase
81 else:
82 self.normcase = lambda x: x
79
83
80 def __call__(self, path):
84 def __call__(self, path):
81 '''Check the relative path.
85 '''Check the relative path.
82 path may contain a pattern (e.g. foodir/**.txt)'''
86 path may contain a pattern (e.g. foodir/**.txt)'''
83
87
84 normpath = os.path.normcase(path)
88 normpath = self.normcase(path)
85 if normpath in self.audited:
89 if normpath in self.audited:
86 return
90 return
87 # AIX ignores "/" at end of path, others raise EISDIR.
91 # AIX ignores "/" at end of path, others raise EISDIR.
General Comments 0
You need to be logged in to leave comments. Login now