From d53476399dfd85351de8df537c9af3236df45c6f Mon Sep 17 00:00:00 2001 From: Gergely Koloszar Date: Sat, 18 Oct 2025 22:52:49 +0200 Subject: [PATCH] Clean up setup_state_files --- dzgui.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dzgui.sh b/dzgui.sh index a2fab92..ddd06d8 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -108,9 +108,8 @@ setup_state_files(){ logger INFO "Migrating legacy version file" fi # wipe cache files - local path="$cache_path" - if find "$path" -mindepth 1 -maxdepth 1 | read; then - for file in $path/*; do + if [[ $(ls "$cache_path") ]]; then + for file in "$cache_path"/*; do rm "$file" done logger INFO "Wiped cache files"