summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-07-09 08:28:57 +0200
committerGitHub <noreply@github.com>2020-07-09 08:28:57 +0200
commitf3768e2a2a3b4dc898d1760ff7bba1e9ef743fa2 (patch)
treeeec76ad0869790a850735f1f9d3324bc795a7fa1 /lib
parent5864501d3f4a2bcc5eec110b29766cd2b0ab95d2 (diff)
parentc7d9636e82c88d30fd7346af819d303dc3d09592 (diff)
downloadnextcloud-server-f3768e2a2a3b4dc898d1760ff7bba1e9ef743fa2.tar.gz
nextcloud-server-f3768e2a2a3b4dc898d1760ff7bba1e9ef743fa2.zip
Merge pull request #21761 from nextcloud/fix/permission_check_translation
Kill another unneeded translation
Diffstat (limited to 'lib')
-rw-r--r--lib/private/legacy/OC_Util.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php
index ae1b28d5bb0..8d2bf477d52 100644
--- a/lib/private/legacy/OC_Util.php
+++ b/lib/private/legacy/OC_Util.php
@@ -998,23 +998,21 @@ class OC_Util {
if (\OC::$server->getConfig()->getSystemValue('check_data_directory_permissions', true) === false) {
return [];
}
- $l = \OC::$server->getL10N('lib');
- $errors = [];
- $permissionsModHint = $l->t('Please change the permissions to 0770 so that the directory'
- . ' cannot be listed by other users.');
+
$perms = substr(decoct(@fileperms($dataDirectory)), -3);
if (substr($perms, -1) !== '0') {
chmod($dataDirectory, 0770);
clearstatcache();
$perms = substr(decoct(@fileperms($dataDirectory)), -3);
if ($perms[2] !== '0') {
- $errors[] = [
+ $l = \OC::$server->getL10N('lib');
+ return [
'error' => $l->t('Your data directory is readable by other users'),
- 'hint' => $permissionsModHint
+ 'hint' => $l->t('Please change the permissions to 0770 so that the directory cannot be listed by other users.'),
];
}
}
- return $errors;
+ return [];
}
/**