Skip to content

Commit 6d15e9c

Browse files
authored
Merge pull request #4328 from maxmouchet/list_hidden_files
List hidden files if allowed
2 parents 0e28875 + 533e198 commit 6d15e9c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

notebook/services/contents/filemanager.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -334,11 +334,11 @@ def _dir_model(self, path, content=True):
334334
self.log.debug("%s not a regular file", os_path)
335335
continue
336336

337-
if self.should_list(name) and not is_file_hidden(os_path, stat_res=st):
338-
contents.append(self.get(
339-
path='%s/%s' % (path, name),
340-
content=False)
341-
)
337+
if self.should_list(name):
338+
if self.allow_hidden or not is_file_hidden(os_path, stat_res=st):
339+
contents.append(
340+
self.get(path='%s/%s' % (path, name), content=False)
341+
)
342342

343343
model['format'] = 'json'
344344

0 commit comments

Comments
 (0)