--- cache.fs.inc	2009-03-30 11:55:39.372850800 +0100
+++ cache.fs.inc	2009-03-30 12:16:39.188701800 +0100
@@ -60,8 +60,9 @@
 
   if (file_exists($cache_file)) {    
     if ($fp = fopen($cache_file, 'r')) {
-      if (flock($fp, LOCK_SH)) {
-        $data = fread($fp, filesize($cache_file));
+      $filesize = filesize($cache_file);
+      if ($filesize > 0 && flock($fp, LOCK_SH)) {
+        $data = fread($fp, $filesize);
         flock($fp, LOCK_UN);
         $cache = unserialize($data);
       }
--- fastpath_fscache.module	2009-03-30 11:55:39.382615800 +0100
+++ fastpath_fscache.module	2009-03-30 12:14:49.780665300 +0100
@@ -55,6 +55,7 @@
         // We need an exclusive lock, but don't block if we can't get it as
         // we can simply try again next time cron is run.
         if (flock($fp, LOCK_EX|LOCK_NB)) {
+          unset($fp); // free the handle before delete
           unlink($file->filename);
         }
       }
