Simplify handling of going up from root

This commit is contained in:
lel 2019-09-28 03:22:01 -04:00
parent 620800c9da
commit 7997c40e94
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ class GeminiItem():
pathbits.pop()
# Don't try to go higher than root
if len(pathbits) == 1:
return GeminiItem(self.url)
return self
# Get rid of bottom component
pathbits.pop()
new_path = os.path.join(*pathbits)