changeset 258:0cd601956a9a

Merge.
author Edho Arief <edho@myconan.net>
date Sun, 20 Nov 2011 23:21:45 +0700
parents d7e5a2e70cf3 (diff) adcea08f6807 (current diff)
children 1e214a53237d
files
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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}")"