Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/util.py @ 5162:9374373fb727
util: ignore invalid path errors in path_auditor.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Mon, 13 Aug 2007 19:42:50 +0200 |
parents | d84329a11fdd |
children | c7e8fe11f34a |
comparison
equal
deleted
inserted
replaced
5161:4ed58fe4fe13 | 5162:9374373fb727 |
---|---|
706 def check(prefix): | 706 def check(prefix): |
707 curpath = os.path.join(self.root, prefix) | 707 curpath = os.path.join(self.root, prefix) |
708 try: | 708 try: |
709 st = os.lstat(curpath) | 709 st = os.lstat(curpath) |
710 except OSError, err: | 710 except OSError, err: |
711 if err.errno != errno.ENOENT: | 711 # EINVAL can be raised as invalid path syntax under win32. |
712 # They must be ignored for patterns can be checked too. | |
713 if err.errno not in (errno.ENOENT, errno.EINVAL): | |
712 raise | 714 raise |
713 else: | 715 else: |
714 if stat.S_ISLNK(st.st_mode): | 716 if stat.S_ISLNK(st.st_mode): |
715 raise Abort(_('path %r traverses symbolic link %r') % | 717 raise Abort(_('path %r traverses symbolic link %r') % |
716 (path, prefix)) | 718 (path, prefix)) |