Merge pull request #4328 from maxmouchet/list_hidden_files

List hidden files if allowed
Min RK 7 years ago committed by GitHub
commit 6d15e9cdab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -334,11 +334,11 @@ 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):
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'

Loading…
Cancel
Save