fixing wrong echo in function; fixing wrong variable when hash is wrong

This commit is contained in:
2015-06-24 17:25:51 +03:00
parent c90993706c
commit 544a21de1c

View File

@@ -115,9 +115,9 @@ function compall {
SIZE=$2
HASH=$3
if $(compdu $FILE $SIZE) && $(comphash $FILE $HASH); then
echo="true"
echo "true"
else
echo="false"
echo "false"
fi
}
@@ -332,7 +332,7 @@ until [ "$STATUS" == "F" ]; do
fi
# File already exists, has correct size, but has wrong hashsum
elif [ -e $SMALLPATH ] && $(compdu $SMALLPATH SMALLSIZE) && ! $(comphash $SMALLPATH $SMALLHASH); then
elif [ -e $SMALLPATH ] && $(compdu $SMALLPATH $SMALLSIZE) && ! $(comphash $SMALLPATH $SMALLHASH); then
echo "[ERROR] Hashsum is different but file has same size."
echo "[INFO] Deleting file and starting new download."
checkwait