Merge pull request #10698 from nextcloud/smb-log-removed-entries-13

[13] log entries that are hidden during file listing
This commit is contained in:
blizzz 2018-08-20 14:53:08 +02:00 committed by GitHub
commit ace570d723
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -160,10 +160,15 @@ class SMB extends Common implements INotifyStorage {
}
return array_filter($files, function (IFileInfo $file) {
try {
if ($file->isHidden()) {
\OC::$server->getLogger()->debug('hiding hidden file ' . $file->getName());
}
return !$file->isHidden();
} catch (ForbiddenException $e) {
\OC::$server->getLogger()->logException($e, ['level' => Util::DEBUG, 'message' => 'Hiding forbidden entry ' . $file->getName()]);
return false;
} catch (NotFoundException $e) {
\OC::$server->getLogger()->logException($e, ['level' => Util::DEBUG, 'message' => 'Hiding not found entry ' . $file->getName()]);
return false;
}
});