Merge pull request #81 from neolao/master

Check item alias
This commit is contained in:
GNU 2018-08-04 08:21:17 +08:00 committed by GitHub
commit cdd7caebff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,6 +72,12 @@ class ListItem(object):
self._Path = text
label_text = os.path.basename(text)
alias_file = os.path.splitext(text)[0] + ".alias"
if os.path.isfile(alias_file):
fp = open(alias_file, "r")
alias = fp.read()
fp.close()
label_text = alias
if self._MyType == ICON_TYPES["DIR"]:
l.Init(label_text,self._Fonts["normal"])