From bf851a84bd5aa3acd2c1cae7d57551a1a88a52ea Mon Sep 17 00:00:00 2001 From: Jacob Hayes Date: Thu, 19 Dec 2024 15:59:28 +0800 Subject: [PATCH] Skip restore content cleanup to fix fish shell restore Signed-off-by: Jacob Hayes --- scripts/helpers.sh | 1 + scripts/restore.sh | 9 --------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/scripts/helpers.sh b/scripts/helpers.sh index 20d87dcd..d91a04c8 100644 --- a/scripts/helpers.sh +++ b/scripts/helpers.sh @@ -89,6 +89,7 @@ pane_content_files_restore_from_archive() { local archive_file="$(pane_contents_archive_file)" if [ -f "$archive_file" ]; then mkdir -p "$(pane_contents_dir "restore")" + rm "$(pane_contents_dir "restore")"/* # Clean up any existing files gzip -d < "$archive_file" | tar xf - -C "$(resurrect_dir)/restore/" fi diff --git a/scripts/restore.sh b/scripts/restore.sh index 1a5e3f98..ec952461 100755 --- a/scripts/restore.sh +++ b/scripts/restore.sh @@ -355,14 +355,6 @@ restore_active_and_alternate_sessions() { done < $(last_resurrect_file) } -# A cleanup that happens after 'restore_all_panes' seems to fix fish shell -# users' restore problems. -cleanup_restored_pane_contents() { - if is_restoring_pane_contents; then - rm "$(pane_contents_dir "restore")"/* - fi -} - main() { if supported_tmux_version_ok && check_saved_session_exists; then start_spinner "Restoring..." "Tmux restore complete!" @@ -378,7 +370,6 @@ main() { restore_grouped_sessions # also restores active and alt windows for grouped sessions restore_active_and_alternate_windows restore_active_and_alternate_sessions - cleanup_restored_pane_contents execute_hook "post-restore-all" stop_spinner display_message "Tmux restore complete!"