From 1566dd1712e53f9d6dcc171d32fe6634818fc7ca Mon Sep 17 00:00:00 2001 From: Maxime Mouchet Date: Tue, 8 Jan 2019 13:42:26 +0100 Subject: [PATCH] List hidden files if allowed (#3812) --- notebook/services/contents/filemanager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebook/services/contents/filemanager.py b/notebook/services/contents/filemanager.py index 3e085b2fa..5ba250d6c 100644 --- a/notebook/services/contents/filemanager.py +++ b/notebook/services/contents/filemanager.py @@ -334,7 +334,7 @@ class FileContentsManager(FileManagerMixin, ContentsManager): 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): + if self.should_list(name) and ((not is_file_hidden(os_path, stat_res=st)) or self.allow_hidden): contents.append(self.get( path='%s/%s' % (path, name), content=False)