--- a/functions/cache.sh	2015-06-18 23:17:34.067597665 +0200
+++ b/functions/cache.sh	2015-06-18 23:25:28.335547138 +0200
@@ -17,7 +17,7 @@
 		if [ -e "${DIRECTORY}" ]
 		then
 			# Restore old cache
-			if [ "$(stat --printf %d ${DIRECTORY})" = "$(stat --printf %d chroot/var/cache/apt/archives)" ]
+			if [ "$(stat --printf %d ${DIRECTORY}/)" = "$(stat --printf %d chroot/var/cache/apt/archives/)" ]
 			then
 				# with hardlinks
 				find "${DIRECTORY}" -name "*.deb" | xargs cp -fl -t chroot/var/cache/apt/archives

