Makes adding to the associative arrays correct.

This commit is contained in:
Tony Blyler 2015-02-08 14:30:00 -05:00
parent b1b0c7b4c3
commit e347363249

View file

@ -274,7 +274,7 @@ while true; do
# add the torrent to the queue if it is not already in the queue # add the torrent to the queue if it is not already in the queue
if [[ ! ${TORRENT_QUEUE[${torrent_hash}]+_} ]]; then if [[ ! ${TORRENT_QUEUE[${torrent_hash}]+_} ]]; then
$TORRENT_QUEUE[$torrent_hash]="${sub_file}" TORRENT_QUEUE[$torrent_hash]="${sub_file}"
fi fi
fi fi
done done
@ -289,7 +289,7 @@ while true; do
# add the torrent to the queue if it is not already in the queue # add the torrent to the queue if it is not already in the queue
if [[ ! ${TORRENT_QUEUE[${torrent_hash}]+_} ]]; then if [[ ! ${TORRENT_QUEUE[${torrent_hash}]+_} ]]; then
$TORRENT_QUEUE[$torrent_hash]="${file}" TORRENT_QUEUE[$torrent_hash]="${file}"
fi fi
fi fi
done done
@ -342,7 +342,7 @@ while true; do
# start the download and record the PID # start the download and record the PID
rsync -hrvP --inplace "${SSH_USER}@${SSH_SERVER}:${SSH_SERVER_DOWNLOAD_PATH}/${torrent_name}" "${TORRENT_TMP_DOWNLOAD}/" & rsync -hrvP --inplace "${SSH_USER}@${SSH_SERVER}:${SSH_SERVER_DOWNLOAD_PATH}/${torrent_name}" "${TORRENT_TMP_DOWNLOAD}/" &
${RUNNING_RSYNCS[${torrent_hash}]}=$! RUNNING_RSYNCS[${torrent_hash}]=$!
fi fi
done done
fi fi