syncexists wrong test

This commit is contained in:
Amber 2021-06-22 10:49:48 +02:00
parent f9c2f8a5be
commit f6a6157e4e
1 changed files with 2 additions and 1 deletions

3
masync
View File

@ -67,8 +67,9 @@ hastrailingslash() {
}
syncexists() {
if [ -f "${SYNCFILE}" ]; then
if [ ! -f "${SYNCFILE}" ]; then
echo false
return
fi
localpath_hash=$(echo "$1" | md5sum | cut -f1 --delimiter=" " -)
if [[ $(cat "${SYNCFILE}" | grep "$localpath_hash" | wc -l) -ge 1 ]]; then