mirror of
https://github.com/borgmatic-collective/borgmatic.git
synced 2026-07-22 02:03:01 +02:00
Faster exit for the browse action.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import signal
|
||||
|
||||
import textual.app
|
||||
import textual.binding
|
||||
import textual.widgets
|
||||
@@ -75,3 +77,9 @@ class Browse_app(textual.app.App):
|
||||
'''
|
||||
logs_panel = self.query_one('#logs')
|
||||
logs_panel.styles.display = 'none' if logs_panel.styles.display == 'block' else 'block'
|
||||
|
||||
def exit(self):
|
||||
# Encourages a fast exit by triggering the signal handler in borgmatic/signals.py.
|
||||
signal.raise_signal(signal.SIGTERM)
|
||||
|
||||
super().exit()
|
||||
|
||||
@@ -137,7 +137,7 @@ def add_archive_path(
|
||||
):
|
||||
archive_path_components = get_relative_archive_path_components(archive_path, directory_list.path_components)
|
||||
|
||||
if archive_path_components is None:
|
||||
if not archive_path_components:
|
||||
return
|
||||
|
||||
# If the option is already in the list, bail.
|
||||
|
||||
Reference in New Issue
Block a user