Skip to content

Commit

Permalink
Fixes tedious#347. FileSystem Driver - do not delete root cache direc…
Browse files Browse the repository at this point in the history
…tory while clear on entire pool.
  • Loading branch information
athlan committed Mar 19, 2017
1 parent 69313c9 commit e3a85de
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Stash/Driver/FileSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,11 @@ protected function makePath($key = null)
public function clear($key = null)
{
$path = $this->makePath($key);

if($key === null) {
return Utilities::deleteRecursive($path, false);
}

if (is_file($path)) {
$return = true;
unlink($path);
Expand Down

0 comments on commit e3a85de

Please sign in to comment.