--- imagecache.module	2010-09-09 18:01:57.670843016 +0200
+++ imagecache.module.new	2010-09-09 18:01:12.482438976 +0200
@@ -346,7 +346,6 @@ function _imagecache_strip_file_director
   return $path;
 }
 
-
 /**
  * callback for handling public files imagecache requests.
  */
@@ -358,13 +357,30 @@ function imagecache_cache() {
 }
 
 /**
+ * callback for handling private file permissions (resize_filter, for example)
+ */
+function imagecache_file_download($filepath) {
+  $args = explode('/', $filepath);
+  $first = check_plain(array_shift($args));
+  $preset = check_plain(array_shift($args));
+  $source = implode('/', $args);
+
+  if($first=="imagecache") {
+    if (user_access('view imagecache '. $preset))
+      return module_invoke_all('file_download', $source);
+    else
+      return -1;
+  }
+}
+
+/**
  * callback for handling private files imagecache requests
  */
 function imagecache_cache_private() {
   $args = func_get_args();
   $preset = check_plain(array_shift($args));
   $source = implode('/', $args);
-
+  
   if (user_access('view imagecache '. $preset) && !in_array(-1, module_invoke_all('file_download', $source))) {
     _imagecache_cache($preset, $source);
   }
