fixing a crash when the cache is already a directory
This commit is contained in:
parent
9a1d0fa255
commit
c2879828d6
|
@ -1,6 +1,9 @@
|
|||
# Offpunk History
|
||||
|
||||
## 1.2 - Marche 24th 2022
|
||||
## 1.3 - Unreleased
|
||||
- Fixed a crash when the cache is already a dir inside a dir.
|
||||
|
||||
## 1.2 - March 24th 2022
|
||||
Very experimental release:
|
||||
- Completely rewritten the HMTL, Gemtext and Gopher renderer. Tests needed!
|
||||
- Removed dependancy to ansiwrap. We don’t use it anymore (which is an important achievement)
|
||||
|
|
|
@ -1340,6 +1340,11 @@ class GeminiItem():
|
|||
self.url += "/"
|
||||
if self._cache_path.endswith("/"):
|
||||
self._cache_path += index
|
||||
#sometimes, the index itself is a dir
|
||||
#like when folder/index.gmi?param has been created
|
||||
#and we try to access folder
|
||||
if os.path.isdir(self._cache_path):
|
||||
self._cache_path += "/" + index
|
||||
return self._cache_path
|
||||
|
||||
def get_capsule_title(self):
|
||||
|
|
Loading…
Reference in New Issue