summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBo Ørsted Andresen <bo.andresen@zlin.dk>2007-03-20 17:12:55 +0000
committerBo Ørsted Andresen <bo.andresen@zlin.dk>2007-03-20 17:12:55 +0000
commit36180db7268b4b561e88b51d550d2ccd12896a33 (patch)
tree8895baec94f8b7916cadca3fa1370a182e6e6000
parent0341b1e43a73b527057dad6dad9a46df0950affc (diff)
downloadwgetpaste-36180db7268b4b561e88b51d550d2ccd12896a33.tar.gz
Fix verify_url() for the case when both ${KNOWN} and ${URL} are empty.
-rwxr-xr-xwgetpaste2
1 files changed, 1 insertions, 1 deletions
diff --git a/wgetpaste b/wgetpaste
index 4b965c4..531d152 100755
--- a/wgetpaste
+++ b/wgetpaste
@@ -261,7 +261,7 @@ get_url() {
# verify that the pastebin service didn't return a known error url or print a helpful error message
verify_url() {
local KNOWN="$(eval "echo \"\${${ENGINE}_WARNS[2]}\"")"
- [[ "${URL}" == "${KNOWN}" ]] && die "$(eval "echo \"\${${ENGINE}_WARNS[3]}\"")"
+ [[ -n "${KNOWN}" ]] && [[ "${URL}" == "${KNOWN}" ]] && die "$(eval "echo \"\${${ENGINE}_WARNS[3]}\"")"
}
# if possible convert URL to raw