Removed .. when in root folder.
This commit is contained in:
parent
c8d3fc57c2
commit
4c1ed35390
@ -44,6 +44,9 @@ def dirbrowser(url):
|
|||||||
def is_dir(file):
|
def is_dir(file):
|
||||||
return os.path.isdir(os.path.join(url, file))
|
return os.path.isdir(os.path.join(url, file))
|
||||||
|
|
||||||
|
if os.path.dirname(url) == url:
|
||||||
|
parent = None
|
||||||
|
else:
|
||||||
parent = os.path.dirname(url)
|
parent = os.path.dirname(url)
|
||||||
all_files = os.listdir(url)
|
all_files = os.listdir(url)
|
||||||
files = sorted([(file, os.path.join(url, file)) for file in all_files if
|
files = sorted([(file, os.path.join(url, file)) for file in all_files if
|
||||||
|
Loading…
Reference in New Issue
Block a user