Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions bottle.py
Original file line number Diff line number Diff line change
Expand Up @@ -2695,10 +2695,8 @@ def add_path(self, path, base=None, index=None, create=False):
self.path.remove(path)
if create and not os.path.isdir(path):
os.makedirs(path)
if index is None:
self.path.append(path)
else:
self.path.insert(index, path)
if index is None: index = len(self.path)
self.path.insert(index, path)
self.cache.clear()
return os.path.exists(path)

Expand Down