Skip to content

Commit

Permalink
close #15142 make the FilesystemAdapter::delete() behave like FileSys…
Browse files Browse the repository at this point in the history
…tem::delete() (#15308)
  • Loading branch information
themsaid authored and taylorotwell committed Sep 7, 2016
1 parent f971564 commit e68358d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Illuminate/Filesystem/FilesystemAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,19 @@ public function delete($paths)
{
$paths = is_array($paths) ? $paths : func_get_args();

$success = true;

foreach ($paths as $path) {
try {
$this->driver->delete($path);
if (! $this->driver->delete($path)) {
$success = false;
}
} catch (FileNotFoundException $e) {
//
$success = false;
}
}

return true;
return $success;
}

/**
Expand Down

0 comments on commit e68358d

Please sign in to comment.