working on get_body

This commit is contained in:
Lionel Dricot 2023-07-31 18:53:26 +02:00
parent 9609a8d91f
commit b3051efe72
2 changed files with 4 additions and 4 deletions

View File

@ -225,6 +225,10 @@ def get_cache_path(url):
#and we try to access folder
if os.path.isdir(cache_path):
cache_path += "/" + index
if len(cache_path) > 259:
print("Path is too long. This is an OS limitation.\n\n")
print(url)
return None
return cache_path
def write_body(url,body,mime=None):

View File

@ -179,10 +179,6 @@ class GeminiItem():
path = None
if path:
# Theres on OSlimit on path length
if len(path) > 259:
toreturn = "Path is too long. This is an OS limitation.\n\n"
toreturn += self.url
return toreturn
elif as_file:
return path
else: