Skip to content

Commit dc381dd

Browse files
author
hiromi2424
committed
Fix unlink() for CacheEngine::clear() failed on windows.
1 parent 49d66af commit dc381dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Cake/Cache/Engine/FileEngine.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,9 @@ protected function _clearDirectory($path, $now, $threshold) {
281281
}
282282
}
283283
if ($file->isFile()) {
284-
unlink($file->getRealPath());
284+
$_path = $file->getRealPath();
285+
unset($file);
286+
unlink($_path);
285287
}
286288
}
287289
}

0 commit comments

Comments
 (0)