Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
automatic_updates
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
automatic_updates
Merge requests
!900
Issue
#3363938
: Package Manager should ignore default.settings.php and default.services.yml
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3363938
: Package Manager should ignore default.settings.php and default.services.yml
issue/automatic_updates-3363938:3363938-package-manager-should
into
3.0.x
Overview
1
Commits
14
Pipelines
1
Changes
6
1 unresolved thread
Hide all comments
Merged
Adam G-H
requested to merge
issue/automatic_updates-3363938:3363938-package-manager-should
into
3.0.x
1 year ago
Overview
1
Commits
14
Pipelines
1
Changes
1
1 unresolved thread
Hide all comments
Expand
0
0
Merge request reports
Compare
version 9
version 12
1da7fb17
1 year ago
version 11
76b973e4
1 year ago
version 10
44e610d3
1 year ago
version 9
ce2af104
1 year ago
version 8
0fddd058
1 year ago
version 7
6a2b235b
1 year ago
version 6
97d70232
1 year ago
version 5
9e6226d5
1 year ago
version 4
35c5b474
1 year ago
version 3
4582953e
1 year ago
version 2
1ab5b8b5
1 year ago
version 1
a28798e6
1 year ago
3.0.x (base)
and
version 10
latest version
1da7fb17
14 commits,
1 year ago
version 12
1da7fb17
14 commits,
1 year ago
version 11
76b973e4
14 commits,
1 year ago
version 10
44e610d3
13 commits,
1 year ago
version 9
ce2af104
12 commits,
1 year ago
version 8
0fddd058
11 commits,
1 year ago
version 7
6a2b235b
10 commits,
1 year ago
version 6
97d70232
8 commits,
1 year ago
version 5
9e6226d5
5 commits,
1 year ago
version 4
35c5b474
4 commits,
1 year ago
version 3
4582953e
3 commits,
1 year ago
version 2
1ab5b8b5
2 commits,
1 year ago
version 1
a28798e6
1 commit,
1 year ago
Show latest version
1 file
+
4
−
25
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
package_manager/src/PathExcluder/SiteConfigurationExcluder.php
+
4
−
25
Options
@@ -112,37 +112,16 @@ class SiteConfigurationExcluder implements EventSubscriberInterface {
}
$live_dir
=
$this
->
getDefaultSiteDirectoryPath
(
$this
->
pathLocator
->
getProjectRoot
());
// 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
);
$permissions
=
fileperms
(
$live_dir
);
if
(
$permissions
===
FALSE
)
{
throw
new
FileException
(
"Could not determine permissions for '
$live_dir
'."
);
}
if
(
!
$this
->
fileSystem
->
chmod
(
$staged_dir
,
$permissions
))
{
throw
new
FileException
(
"Could not change permissions on '
$staged_dir
'."
);
}
}
/**
* Gets the current file permissions of a path.
*
* @param string $path
* The path to examine.
*
* @return int
* The current permissions of the path.
*
* @throws \Drupal\Core\File\Exception\FileException
* Thrown if the file permissions cannot be determined.
*/
private
function
getPermissions
(
string
$path
):
int
{
$permissions
=
fileperms
(
$path
);
if
(
$permissions
===
FALSE
)
{
throw
new
FileException
(
"Could not determine permissions for '
$path
'."
);
}
return
$permissions
;
}
/**
* Returns the full path to `sites/default`, relative to a root directory.
*
Loading