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: