mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Fix encoding handling in unfrackpath.
This commit is contained in:
@@ -45,7 +45,7 @@ def unfrackpath(path, follow=True, basedir=None):
|
|||||||
|
|
||||||
if basedir is None:
|
if basedir is None:
|
||||||
basedir = os.getcwd()
|
basedir = os.getcwd()
|
||||||
elif os.path.isfile(basedir):
|
elif os.path.isfile(to_bytes(basedir, errors='surrogate_or_strict')):
|
||||||
basedir = os.path.dirname(basedir)
|
basedir = os.path.dirname(basedir)
|
||||||
|
|
||||||
final_path = os.path.expanduser(os.path.expandvars(to_bytes(path, errors='surrogate_or_strict')))
|
final_path = os.path.expanduser(os.path.expandvars(to_bytes(path, errors='surrogate_or_strict')))
|
||||||
|
|||||||
Reference in New Issue
Block a user