summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclsr <clsr@clsr.net>2017-11-03 05:31:58 +0100
committerclsr <clsr@clsr.net>2017-11-03 05:31:58 +0100
commit701a68faf126deccb620809582ce962de88e4a80 (patch)
tree04faaca2bd3c57d594031dccd1433d1cf2eb2866
parentb0f31c748aee7bf10ffbed4e36ec7914104752da (diff)
downloadgomf-tools-master.tar.gz
gomf-tools-master.zip
run-gomf: fix FILTER_MIME and FILTER_EXT when set to emptyHEADmaster
-rwxr-xr-xrun-gomf.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/run-gomf.bash b/run-gomf.bash
index 78fa7ac..2e2c0ef 100755
--- a/run-gomf.bash
+++ b/run-gomf.bash
@@ -196,8 +196,8 @@ flags=()
[ -n "${MAX_SIZE_MIB}" ] && flags+=(--max-size "$((MAX_SIZE_MIB*1024*1024))")
[ "${WHITELIST:-0}" -ne 0 ] && flags+=(--whitelist)
oldifs="$IFS" IFS=,
-[ -n "$FILTER_EXT" ] && flags+=(--filter-ext "${FILTER_EXT[*]}")
-[ -n "$FILTER_MIME" ] && flags+=(--filter-mime "${FILTER_MIME[*]}")
+[ -n "$(declare -p FILTER_EXT 2>/dev/null)" ] && flags+=(--filter-ext "${FILTER_EXT[*]}")
+[ -n "$(declare -p FILTER_MIME 2>/dev/null)" ] && flags+=(--filter-mime "${FILTER_MIME[*]}")
IFS="$oldifs"
[ "${ALLOW_HTML:-0}" -ne 0 ] && flags+=(--allow-html)
[ "${CORS:-0}" -ne 0 ] && flags+=(--cors)