Show More
@@ -815,13 +815,15 b' class path_auditor(object):' | |||
|
815 | 815 | return |
|
816 | 816 | normpath = os.path.normcase(path) |
|
817 | 817 | parts = splitpath(normpath) |
|
818 |
if (os.path.splitdrive(path)[0] |
|
|
818 | if (os.path.splitdrive(path)[0] | |
|
819 | or parts[0].lower() in ('.hg', '.hg.', '') | |
|
819 | 820 | or os.pardir in parts): |
|
820 | 821 | raise Abort(_("path contains illegal component: %s") % path) |
|
821 | if '.hg' in path: | |
|
822 | if '.hg' in path.lower(): | |
|
823 | lparts = [p.lower() for p in parts] | |
|
822 | 824 | for p in '.hg', '.hg.': |
|
823 | if p in parts[1:-1]: | |
|
824 | pos = parts.index(p) | |
|
825 | if p in lparts[1:-1]: | |
|
826 | pos = lparts.index(p) | |
|
825 | 827 | base = os.path.join(*parts[:pos]) |
|
826 | 828 | raise Abort(_('path %r is inside repo %r') % (path, base)) |
|
827 | 829 | def check(prefix): |
General Comments 0
You need to be logged in to leave comments.
Login now