diff --git a/Scripts/7D2D-Manage.bash b/Scripts/7D2D-Manage.bash index ac8e22d..448579d 100644 --- a/Scripts/7D2D-Manage.bash +++ b/Scripts/7D2D-Manage.bash @@ -272,13 +272,15 @@ start_server() { lint_dirs=("${server_directory}" "${server_directory}/Saves") if which xmllint >/dev/null 2>&1; then for dir in "${lint_dirs[@]}"; do - for xml_file in "${dir}"/*.xml; do - log "info" "Linting $(important "${xml_file}")" - if ! xmllint "${xml_file}" >/dev/null; then - log "error" "Xml parsing error in $(important "${xml_file}"), resolve the error and attempt to start again" - return 1 - fi - done + if ls "${dir}"/*.xml >/dev/null 2>&1; then + for xml_file in "${dir}"/*.xml; do + log "info" "Linting $(important "${xml_file}")" + if ! xmllint "${xml_file}" >/dev/null; then + log "error" "Xml parsing error in $(important "${xml_file}"), resolve the error and attempt to start again" + return 1 + fi + done + fi done else log "warning" "$(important "xmllint") not installed or not in PATH, skipping lint check"