Skip to content

Commit

Permalink
log entries that are hidden during file listing
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <robin@icewind.nl>
  • Loading branch information
icewind1991 committed Aug 15, 2018
1 parent 294baf8 commit b2685eb
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 b2685eb

Please sign in to comment.