Merge pull request #48246 from nextcloud/bug/noid/profile-clear-not-working

fix(profiler): clear command does not work
pull/48252/head
Ferdinand Thiessen 2024-09-21 12:52:47 +07:00 committed by GitHub
commit 59059f6605
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

@ -81,11 +81,11 @@ class FileProfilerStorage {
$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);
}
}
}