diff options
author | Rid <rid@cylo.io> | 2021-06-17 11:44:44 +0100 |
---|---|---|
committer | Rid <rid@cylo.io> | 2021-06-17 11:44:44 +0100 |
commit | 0469acfb209f5851d2fcadf46654d59bf1637055 (patch) | |
tree | 4929c1c056c1568036ba90da20e7d0e6ecf9af82 /lib | |
parent | 39f0aa5abe0867a99218b76995d114ce7b394b84 (diff) | |
download | nextcloud-server-0469acfb209f5851d2fcadf46654d59bf1637055.tar.gz nextcloud-server-0469acfb209f5851d2fcadf46654d59bf1637055.zip |
Fix scanner mistaking socket files for directories
Signed-off-by: Rid <rid@cylo.io>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Storage/Local.php | 4 |
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) { |