File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ validate_zip_archive_paths() {
6868# Returns true (0) when a directory is absent or contains no files/subdirs
6969is_directory_absent_or_empty () {
7070 local dir=" $1 "
71- [[ ! -d " $dir " ]] || [[ -z " $( find " $dir " -mindepth 1 -print -quit 2> /dev/null ) " ]]
71+ [[ ! -d " $dir " ]] || [[ -z " $( find " $dir " -mindepth 1 -print -quit) " ]]
7272}
7373
7474# --- Instructions for Preparing Files ---
@@ -156,6 +156,8 @@ extract_prefix_from_db() {
156156 # Look for CREATE TABLE or INSERT INTO lines with common tables (_options or _users)
157157 # Capture the table name between backticks/quotes, then strip _options/_users to derive prefix
158158 local search_pattern=" (CREATE TABLE|INSERT INTO)[[:space:]]+(\` |\" )[^\`\" ]+_(options|users)(\` |\" )"
159+ # NOTE: [^\`\"]+ intentionally allows hyphens and other characters valid in MySQL table names,
160+ # broadening the previous [a-zA-Z0-9_]+ which would miss prefixes like "my-site_".
159161 local table_name=" "
160162
161163 # Use zgrep for .gz, grep for .sql.
You can’t perform that action at this time.
0 commit comments