From e1ce55b547a70405704d5669fd33e5e5890e2bde Mon Sep 17 00:00:00 2001 From: TowyTowy <85077986+TowyTowy@users.noreply.github.com> Date: Sun, 19 Jul 2026 19:01:41 +0200 Subject: [PATCH] fix(build.func): expand glob in SSH key "Scan Folder/Glob" so it can find keys (#15873) Co-authored-by: Claude Co-authored-by: Sam Heinz --- misc/build.func | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/build.func b/misc/build.func index 53509780f..6c5d20bfc 100644 --- a/misc/build.func +++ b/misc/build.func @@ -3600,9 +3600,9 @@ configure_ssh_settings() { glob_path=$(whiptail --backtitle "$backtitle" \ --inputbox "Enter a folder or glob to scan (e.g. /root/.ssh/*.pub)" 10 72 --title "Scan Folder/Glob" 3>&1 1>&2 2>&3) if [[ -n "$glob_path" ]]; then - shopt -s nullglob - read -r -a _scan_files <<<"$glob_path" - shopt -u nullglob + [[ -d "$glob_path" ]] && glob_path="${glob_path%/}/*" + local -a _scan_files + mapfile -t _scan_files < <(compgen -G "$glob_path") if [[ "${#_scan_files[@]}" -gt 0 ]]; then ssh_build_choices_from_files "${_scan_files[@]}" if [[ "$COUNT" -gt 0 ]]; then