aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2021-07-01 17:36:06 +0200
committerGitHub <noreply@github.com>2021-07-01 17:36:06 +0200
commit7589d5a1763082d2ac9e65e60e6d5c2d7c625b98 (patch)
tree528529d0389c53cb39880c61cd2c5399db71795f
parent62675eb5c24de864b48607f840e6f1bc2e4cb071 (diff)
parent0469acfb209f5851d2fcadf46654d59bf1637055 (diff)
downloadnextcloud-server-7589d5a1763082d2ac9e65e60e6d5c2d7c625b98.tar.gz
nextcloud-server-7589d5a1763082d2ac9e65e60e6d5c2d7c625b98.zip
Merge pull request #27533 from Rid/master
Fix scanner mistaking socket files for directories
-rw-r--r--lib/private/Files/Storage/Local.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index d116d2e0fb1..ccd331f515f 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -169,7 +169,7 @@ class Local extends \OC\Files\Storage\Common {
$permissions = Constants::PERMISSION_SHARE;
$statPermissions = $stat['mode'];
- $isDir = ($statPermissions & 0x4000) === 0x4000;
+ $isDir = ($statPermissions & 0x4000) === 0x4000 && !($statPermissions & 0x8000);
if ($statPermissions & 0x0100) {
$permissions += Constants::PERMISSION_READ;
}
@@ -492,7 +492,7 @@ class Local extends \OC\Files\Storage\Common {
}
private function calculateEtag(string $path, array $stat): string {
- if ($stat['mode'] & 0x4000) { // is_dir
+ if ($stat['mode'] & 0x4000 && !($stat['mode'] & 0x8000)) { // is_dir & not socket
return parent::getETag($path);
} else {
if ($stat === false) {