diff --git a/borgmatic/actions/browse/app.py b/borgmatic/actions/browse/app.py index 30035f9c..2d0e6f4a 100644 --- a/borgmatic/actions/browse/app.py +++ b/borgmatic/actions/browse/app.py @@ -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() diff --git a/borgmatic/actions/browse/panels.py b/borgmatic/actions/browse/panels.py index 3e97939e..c45e252e 100644 --- a/borgmatic/actions/browse/panels.py +++ b/borgmatic/actions/browse/panels.py @@ -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.