From 0edd1d95d40742e8b206b193fb964c8482910af1 Mon Sep 17 00:00:00 2001 From: Drew Short Date: Mon, 10 Feb 2014 14:00:33 -0500 Subject: [PATCH] Fix for the thumbnail generation routine --- src/main/scala/com/sothr/imagetools/image/ImageService.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/com/sothr/imagetools/image/ImageService.scala b/src/main/scala/com/sothr/imagetools/image/ImageService.scala index 3b4735b..d8b9659 100644 --- a/src/main/scala/com/sothr/imagetools/image/ImageService.scala +++ b/src/main/scala/com/sothr/imagetools/image/ImageService.scala @@ -79,9 +79,9 @@ object ImageService extends Logging { def calculateThumbPath(md5:String):String = { //break the path down into 4 char parts - val split:List[String] = md5.grouped(4).toList + val split:List[String] = md5.grouped(3).toList var dirPath = "" - for (seg <- split) dirPath += seg + "/" + for (index <- 0 until (split.length-1)) dirPath += split(index) + "/" var path:String = s"${PropertiesService.get(PropertiesEnum.ThumbnailDirectory.toString)}${PropertiesService.get(PropertiesEnum.ThumbnailSize.toString)}/$dirPath" try { val dir = new File(path)