Skip to content

Commit

Permalink
Merge pull request #48246 from nextcloud/bug/noid/profile-clear-not-w…
Browse files Browse the repository at this point in the history
…orking

fix(profiler): clear command does not work
  • Loading branch information
susnux authored Sep 21, 2024
2 parents a1b538d + 4ae10aa commit 59059f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/private/Profiler/FileProfilerStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ public function purge(): void {
$iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::CHILD_FIRST);

foreach ($iterator as $file) {
$file = (string)$file->getPathInfo();
if (is_file($file)) {
unlink($file);
$path = $file->getPathname();
if (is_file($path)) {
unlink($path);
} else {
rmdir($file);
rmdir($path);
}
}
}
Expand Down

0 comments on commit 59059f6

Please sign in to comment.