mercurial/util.py
changeset 13926 61ba09d8d118
parent 13916 98ee3dd5bab4
child 13928 155d2e17884e
--- a/mercurial/util.py	Sun Apr 10 11:30:53 2011 +0300
+++ b/mercurial/util.py	Sun Apr 10 19:31:49 2011 +0200
@@ -602,9 +602,6 @@
             prefixes.append(prefix)
             parts.pop()
 
-        r = checkosfilename(path)
-        if r:
-            raise Abort("%s: %s" % (r, path))
         self.audited.add(path)
         # only add prefixes to the cache after checking everything: we don't
         # want to add "foo/bar/baz" before checking if there's a "foo/.hg"
@@ -916,6 +913,9 @@
         os.chmod(name, self.createmode & 0666)
 
     def __call__(self, path, mode="r", text=False, atomictemp=False):
+        r = checkosfilename(path)
+        if r:
+            raise Abort("%s: %s" % (r, path))
         self.auditor(path)
         f = os.path.join(self.base, path)