From af8e79d8093dad66d31e7f2b1791125c3be54606 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Thu, 27 Feb 2025 11:00:51 -0500 Subject: [PATCH] Restore configurator_check_multifile_game_structure() function, but in configurator_functions.sh --- functions/configurator_functions.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/functions/configurator_functions.sh b/functions/configurator_functions.sh index 6bba4ab6..acf7ff5a 100644 --- a/functions/configurator_functions.sh +++ b/functions/configurator_functions.sh @@ -50,3 +50,16 @@ find_empty_rom_folders() { done } +configurator_check_multifile_game_structure() { + local folder_games=($(find $roms_folder -maxdepth 2 -mindepth 2 -type d ! -name "*.m3u" ! -name "*.ps3")) + if [[ ${#folder_games[@]} -gt 1 ]]; then + echo "$(find $roms_folder -maxdepth 2 -mindepth 2 -type d ! -name "*.m3u" ! -name "*.ps3")" > $logs_folder/multi_file_games_"$(date +"%Y_%m_%d_%I_%M_%p").log" + rd_zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap \ + --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ + --title "RetroDECK Configurator - Verify Multi-file Structure" \ + --text="The following games were found to have the incorrect folder structure:\n\n$(find $roms_folder -maxdepth 2 -mindepth 2 -type d ! -name "*.m3u" ! -name "*.ps3")\n\nIncorrect folder structure can result in failure to launch games or saves being in the incorrect location.\n\nPlease see the RetroDECK wiki for more details!\n\nYou can find this list of games in ~/retrodeck/logs" + else + configurator_generic_dialog "RetroDECK Configurator - Verify Multi-file Structure" "No incorrect multi-file game folder structures found." + fi + configurator_welcome_dialog +}