Removed .. when in root folder.

This commit is contained in:
Antoni Boucher 2015-08-07 22:45:42 -04:00
parent c8d3fc57c2
commit 4c1ed35390

View File

@ -44,7 +44,10 @@ def dirbrowser(url):
def is_dir(file):
return os.path.isdir(os.path.join(url, file))
parent = os.path.dirname(url)
if os.path.dirname(url) == url:
parent = None
else:
parent = os.path.dirname(url)
all_files = os.listdir(url)
files = sorted([(file, os.path.join(url, file)) for file in all_files if
is_file(file)])