From b3051efe72531d550c9aa0c60111aad3b49097a2 Mon Sep 17 00:00:00 2001 From: Lionel Dricot Date: Mon, 31 Jul 2023 18:53:26 +0200 Subject: [PATCH] working on get_body --- netcache.py | 4 ++++ offpunk.py | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/netcache.py b/netcache.py index 016f37f..8dde7ca 100755 --- a/netcache.py +++ b/netcache.py @@ -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): diff --git a/offpunk.py b/offpunk.py index 53810b2..408eb67 100755 --- a/offpunk.py +++ b/offpunk.py @@ -179,10 +179,6 @@ class GeminiItem(): path = None if path: # There’s on OS limit 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: