Remove deleteRecursive callback, but I think it might still be needed. Let us...
1 unresolved thread
Remove deleteRecursive callback, but I think it might still be needed. Let us at least see if any tests fail.
Closes #3429268
Merge request reports
Activity
54 54 55 55 if (file_exists($dir)) { 56 56 $this->fileSystem->deleteRecursive($dir, function (string $path): void { 57 $this->fileSystem->chmod($path, 0777); 57 $this->fileSystem->chmod($path, is_dir($path) ? 0700 : 0600); for issue summary
This could be achieved by simply omitting the callback passed to the deleteRecursive function, as the Drupal core function already performs this internally.
Looking at
\Drupal\Core\File\FileSystem::deleteRecursive
it does look like for directories it will call\Drupal\Core\File\FileSystem::rmdir
which will set permissions to 700 and for files it will call\Drupal\Core\File\FileSystem::unlink
does set permission to 600 so do we need this callback at all?
Please register or sign in to reply