solve a crash when calling less after a mailto link
This commit is contained in:
parent
4f56a85e28
commit
6d87b2f4bc
|
@ -1,5 +1,8 @@
|
||||||
# Offpunk History
|
# Offpunk History
|
||||||
|
|
||||||
|
## 0.5 - Unreleased
|
||||||
|
- Avoid deprecated SSL methods (thanks Phoebos for the report)
|
||||||
|
|
||||||
## 0.4 - Feb 21st 2022
|
## 0.4 - Feb 21st 2022
|
||||||
UPGRADE: Users who subscribed to pages before 0.4 should run once the command "list subscribe subscribed". Without that, the subscribed list will be seen as a normal list by sync.
|
UPGRADE: Users who subscribed to pages before 0.4 should run once the command "list subscribe subscribed". Without that, the subscribed list will be seen as a normal list by sync.
|
||||||
- New list command : "list freeze" and "list suscribe"
|
- New list command : "list freeze" and "list suscribe"
|
||||||
|
|
|
@ -1236,7 +1236,9 @@ class GeminiItem():
|
||||||
return self.mime
|
return self.mime
|
||||||
elif self.is_cache_valid():
|
elif self.is_cache_valid():
|
||||||
path = self.get_cache_path()
|
path = self.get_cache_path()
|
||||||
if os.path.isdir(path):
|
if self.scheme == "mailto":
|
||||||
|
mime = "mailto"
|
||||||
|
elif os.path.isdir(path):
|
||||||
mime = "Local Folder"
|
mime = "Local Folder"
|
||||||
elif path.endswith(".gmi"):
|
elif path.endswith(".gmi"):
|
||||||
mime = "text/gemini"
|
mime = "text/gemini"
|
||||||
|
@ -2760,7 +2762,7 @@ Use "less full" to see a complete html page instead of the article view.
|
||||||
(the "full" argument has no effect on Gemtext content but doesn’t restore position)."""
|
(the "full" argument has no effect on Gemtext content but doesn’t restore position)."""
|
||||||
if self.gi and args and args[0] == "full":
|
if self.gi and args and args[0] == "full":
|
||||||
self._go_to_gi(self.gi,readable=False)
|
self._go_to_gi(self.gi,readable=False)
|
||||||
elif self.gi.is_cache_valid():
|
elif self.gi.is_cache_valid() and self.gi.scheme not in ["mailto"]:
|
||||||
less_cmd(self._get_active_tmpfile(),histfile=self.less_histfile)
|
less_cmd(self._get_active_tmpfile(),histfile=self.less_histfile)
|
||||||
else:
|
else:
|
||||||
self.do_go(self.gi.url)
|
self.do_go(self.gi.url)
|
||||||
|
|
Loading…
Reference in New Issue