Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix crash if download mirror 0 is selected

  • Loading branch information...
commit 52d93d7a99b19cb5635c6a24d0893be84feff813 1 parent 319ba20
@asergi authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  jdownloader
View
3  jdownloader
@@ -38,7 +38,8 @@ notify() {
download_updater() {
RANDOM_NUMBER=$(dd if=/dev/urandom count=1 2>/dev/null | cksum | cut -f1 -d" ")
- MIRROR=http://update$(expr $RANDOM_NUMBER % $NUMBER_OF_UPDATE_MIRRORS).jdownloader.org/
+ MIRROR_NUMBER=$(expr "$RANDOM_NUMBER" % "$NUMBER_OF_UPDATE_MIRRORS" || true)
+ MIRROR="http://update${MIRROR_NUMBER}.jdownloader.org/"
rm -f jdupdate.jar
echo "$0: Download jdupdate.jar from $MIRROR." >> "$LOG_FILE"
Please sign in to comment.
Something went wrong with that request. Please try again.