mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-10 13:04:03 +03:00
When reloading configuration, also reload mime.types
This commit is contained in:
parent
64fe9f82ed
commit
4141872290
@ -50,6 +50,8 @@ Detailed list of changes
|
||||
|
||||
- Linux: Reduce minimum required OpenGL version from 3.3 to 3.1 + extensions (:iss:`2790`)
|
||||
|
||||
- When reloading configuration, also reload custom MIME types from :file:`mime.types` config file (:pull:`6012`)
|
||||
|
||||
|
||||
0.27.1 [2023-02-07]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -2385,6 +2385,8 @@ class Boss:
|
||||
self.apply_new_options(opts)
|
||||
from .open_actions import clear_caches
|
||||
clear_caches()
|
||||
from .guess_mime_type import clear_mime_cache
|
||||
clear_mime_cache()
|
||||
|
||||
def safe_delete_temp_file(self, path: str) -> None:
|
||||
if is_path_in_temp_dir(path):
|
||||
|
@ -60,6 +60,11 @@ def initialize_mime_database() -> None:
|
||||
init((local_defs,))
|
||||
|
||||
|
||||
def clear_mime_cache() -> None:
|
||||
if hasattr(initialize_mime_database, 'inited'):
|
||||
delattr(initialize_mime_database, 'inited')
|
||||
|
||||
|
||||
def guess_type(path: str, allow_filesystem_access: bool = False) -> Optional[str]:
|
||||
is_dir = is_exe = False
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user