From f98c95f43715d1d3b6d1d17438e2a92d497978fd Mon Sep 17 00:00:00 2001 From: "Muhamed H. Asadi" Date: Mon, 7 Sep 2026 23:27:11 +0330 Subject: [PATCH] refactor(backup): add robust hostname fallback and clean restore preview --- restore.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/restore.sh b/restore.sh index 1be6e43..e97673c 100755 --- a/restore.sh +++ b/restore.sh @@ -154,8 +154,12 @@ fi while true; do echo "" echo "Konsole configuration files to be restored:" - find "${TEMP_DIR}" -mindepth 1 -maxdepth 3 | while read -r f; do + find "${TEMP_DIR}" -mindepth 1 | while read -r f; do rel="${f#"${TEMP_DIR}"/}" + # Skip top-level parent directories if they appear alone + if [ "${rel}" = ".config" ] || [ "${rel}" = ".local" ] || [ "${rel}" = ".local/share" ] || [ "${rel}" = ".local/share/kxmlgui5" ]; then + continue + fi echo " - ~/${rel}" done echo ""