Skip to content
Snippets Groups Projects

Remove deleteRecursive callback, but I think it might still be needed. Let us...

Merged Adam G-H requested to merge issue/automatic_updates-3429268:3429268-chmod-0777-race into 3.0.x
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

Merged results pipeline #143146 passed

Merged results pipeline passed for 2fe978e0

Approval is optional
Code Quality is loading
Test summary results are being parsed

Merged by Adam G-HAdam G-H 11 months ago (Apr 10, 2024 7:20pm UTC)

Merge details

  • Changes merged into 3.0.x with 235da54a (commits were squashed).
  • Did not delete the source branch.

Pipeline #143199 passed

Pipeline passed for 235da54a on 3.0.x

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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
  • merged

  • Please register or sign in to reply
    Loading