Fixed a problem when dir is set to none in file browser

This commit is contained in:
Manuel Cortez 2017-01-30 16:41:41 -06:00
parent 87bb98e7e7
commit 7155e2fcd4

View File

@ -652,8 +652,7 @@ class fileBrowser(Listbox):
def __init__(self, dir="./", select_type="file", action="", prev_items=[], extensions=None, *args, **kwargs): def __init__(self, dir="./", select_type="file", action="", prev_items=[], extensions=None, *args, **kwargs):
self.select_type = select_type self.select_type = select_type
self.selected_action = action self.selected_action = action
if dir: self.dir = dir
self.dir = dir if dir else os.environ.get("HOME","/")
self.prev_items = prev_items self.prev_items = prev_items
self.extensions = extensions self.extensions = extensions
items = self.make_list() items = self.make_list()