mirror of
https://github.com/postgres/pgweb.git
synced 2025-07-25 16:02:27 +00:00
Try not to crash the ftp browser when there is a directory named README
This commit is contained in:
@ -74,9 +74,9 @@ def ftpbrowser(request, subpath):
|
||||
breadcrumbs.append({'name': pathpiece, 'path': breadroot});
|
||||
|
||||
# Check if there are any "content files" we should render directly on the webpage
|
||||
file_readme = node.has_key('README') and node['README']['c'] or None;
|
||||
file_message = node.has_key('.message') and node['.message']['c'] or None;
|
||||
file_maintainer = node.has_key('CURRENT_MAINTAINER') and node['CURRENT_MAINTAINER']['c'] or None;
|
||||
file_readme = (node.has_key('README') and node['README']['t']=='f') and node['README']['c'] or None;
|
||||
file_message = (node.has_key('.message') and node['.message']['t']=='f') and node['.message']['c'] or None;
|
||||
file_maintainer = (node.has_key('CURRENT_MAINTAINER') and node['CURRENT_MAINTAINER']['t'] == 'f') and node['CURRENT_MAINTAINER']['c'] or None;
|
||||
|
||||
del node
|
||||
|
||||
|
Reference in New Issue
Block a user