1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix encoding handling in unfrackpath.

This commit is contained in:
Matt Clay 2019-03-21 15:44:00 -07:00
parent 43bd8c4711
commit eec0275b27

View file

@ -45,7 +45,7 @@ def unfrackpath(path, follow=True, basedir=None):
if basedir is None:
basedir = os.getcwd()
elif os.path.isfile(basedir):
elif os.path.isfile(to_bytes(basedir, errors='surrogate_or_strict')):
basedir = os.path.dirname(basedir)
final_path = os.path.expanduser(os.path.expandvars(to_bytes(path, errors='surrogate_or_strict')))