From bb51f978a4e47fde2e8d0981b858545535da99d5 Mon Sep 17 00:00:00 2001 From: Akuli Date: Wed, 1 Nov 2023 23:23:30 +0200 Subject: [PATCH] add todo comment --- porcupine/plugins/git_status.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/porcupine/plugins/git_status.py b/porcupine/plugins/git_status.py index 592979c05..e1181f98e 100644 --- a/porcupine/plugins/git_status.py +++ b/porcupine/plugins/git_status.py @@ -50,7 +50,10 @@ def _parse_ascii_path_from_git(ascii_str: str) -> Path: path_bytes = ast.literal_eval("b" + ascii_str) # Avoid encoding errors, so that a weird file name will not prevent - # other files from working properly + # other files from working properly. + # + # TODO: sys.getfilesystemencoding() seems to always be UTF-8, even + # on Windows, so not sure if this should always use utf-8 return Path(path_bytes.decode(sys.getfilesystemencoding(), errors="replace")) else: return Path(ascii_str)