comparison mercurial/extensions.py @ 47625:7bafe40ab78a

windows: use abspath in extensions We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. Differential Revision: https://phab.mercurial-scm.org/D11062
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 10 Jul 2021 14:05:59 +0200
parents 553451522113
children a9bedc56f025
comparison
equal deleted inserted replaced
47624:27e75b8bf784 47625:7bafe40ab78a
711 711
712 # The hgext might not have a __file__ attribute (e.g. in PyOxidizer) and 712 # The hgext might not have a __file__ attribute (e.g. in PyOxidizer) and
713 # it might not be on a filesystem even if it does. 713 # it might not be on a filesystem even if it does.
714 if util.safehasattr(hgext, '__file__'): 714 if util.safehasattr(hgext, '__file__'):
715 extpath = os.path.dirname( 715 extpath = os.path.dirname(
716 os.path.abspath(pycompat.fsencode(hgext.__file__)) 716 util.abspath(pycompat.fsencode(hgext.__file__))
717 ) 717 )
718 try: 718 try:
719 files = os.listdir(extpath) 719 files = os.listdir(extpath)
720 except OSError: 720 except OSError:
721 return {} 721 return {}