Skip to content
Snippets Groups Projects

Issue #3363938: Package Manager should ignore default.settings.php and default.services.yml

Merged Issue #3363938: Package Manager should ignore default.settings.php and default.services.yml
1 unresolved thread
1 unresolved thread
1 file
+ 5
2
Compare changes
  • Side-by-side
  • Inline
@@ -87,13 +87,16 @@ class SiteConfigurationExcluder implements EventSubscriberInterface {
*
* @throws \Drupal\Core\File\Exception\FileException
* If the permissions of the either the live or staged `sites/default`
* cannot be determined, or changed on the staged `sites/default`.
* cannot be determined, or cannot be changed on the staged `sites/default`.
*/
public function syncDefaultSiteDirectoryPermissions(PreApplyEvent $event): void {
$live_dir = $this->getDefaultSiteDirectoryPath($this->pathLocator->getProjectRoot());
$staged_dir = $this->getDefaultSiteDirectoryPath($event->stage->getStageDirectory());
// This is borrowed from \Symfony\Component\Filesystem\Filesystem::copy().
// This is borrowed from \Symfony\Component\Filesystem\Filesystem::copy(),
// to ensure the correct permissions are preserved (chmod() requires
// permissions to be sent as an octal number, but fileperms() returns a
// decimal number, because PHP is just great.
$permissions = $this->getPermissions($staged_dir) | ($this->getPermissions($live_dir) & 0111);
if (!$this->fileSystem->chmod($staged_dir, $permissions)) {
Loading