diff --git a/notebook/services/contents/filemanager.py b/notebook/services/contents/filemanager.py index 3e085b2fa5..7f445a8f71 100644 --- a/notebook/services/contents/filemanager.py +++ b/notebook/services/contents/filemanager.py @@ -334,11 +334,11 @@ def _dir_model(self, path, content=True): self.log.debug("%s not a regular file", os_path) continue - if self.should_list(name) and not is_file_hidden(os_path, stat_res=st): - contents.append(self.get( - path='%s/%s' % (path, name), - content=False) - ) + if self.should_list(name): + if self.allow_hidden or not is_file_hidden(os_path, stat_res=st): + contents.append( + self.get(path='%s/%s' % (path, name), content=False) + ) model['format'] = 'json'