Skip to content

Commit

Permalink
Merge pull request #10698 from nextcloud/smb-log-removed-entries-13
Browse files Browse the repository at this point in the history
[13] log entries that are hidden during file listing
  • Loading branch information
blizzz committed Aug 20, 2018
2 parents eea151f + b2685eb commit ace570d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/files_external/lib/Lib/Storage/SMB.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,15 @@ protected function getFolderContents($path) {
}
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;
}
});
Expand Down

0 comments on commit ace570d

Please sign in to comment.