# HG changeset patch # User Edho Arief # Date 1321806105 -25200 # Node ID 0cd601956a9a75c097b6483eb80877d8e07bba68 # Parent d7e5a2e70cf36642e2f03c01dc62a2d0cae45762# Parent adcea08f6807afb0ab3d02a1869460508b8f3c13 Merge. diff -r adcea08f6807 -r 0cd601956a9a bin/moefetch.sh --- a/bin/moefetch.sh Wed Nov 16 22:31:35 2011 +0000 +++ b/bin/moefetch.sh Sun Nov 20 23:21:45 2011 +0700 @@ -161,7 +161,7 @@ Count_Files() { numfiles=0 for dircontent in "${*}/"* "${*}/".*; do - if [ "${dircontent}" != "${*}/*" ] || [ -e "${dircontent}" ]; then + if [ -e "${dircontent}" ] && [ x"${dircontent}" != x"${*}/." ] && [ x"${dircontent}" != x"${*}/.." ]; then numfiles=$((numfiles + 1)) fi done @@ -243,7 +243,7 @@ > "${TEMP_PREFIX}-ok" for file in "${BASE_DIR}/${SITE_DIR}/${TARGET_DIR}/"* do - if [ "${file}" != "${BASE_DIR}/${SITE_DIR}/${TARGET_DIR}/*" ]; then + if [ -e "${file}" ]; then if [ -n "$(is_not_md5 "${file}")" ] || [ -d "${file}" ]; then files_notdanbooru="${files_notdanbooru} $(get_basename "${file}")"