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!"