Merge pull request #286 from cuu/master

alias list_item encode utf8
This commit is contained in:
GNU
2019-08-22 16:30:47 +08:00
committed by GitHub

View File

@@ -73,8 +73,8 @@ class ListItem(object):
label_text = os.path.basename(text) label_text = os.path.basename(text)
alias_file = os.path.splitext(text)[0] + ".alias" alias_file = os.path.splitext(text)[0] + ".alias"
if os.path.isfile(alias_file): if os.path.isfile(alias_file.encode("utf8")):
fp = open(alias_file, "r") fp = open(alias_file.encode("utf8"), "r")
alias = fp.read() alias = fp.read()
fp.close() fp.close()
label_text = alias.decode("utf8") label_text = alias.decode("utf8")