mirror of
https://github.com/postgres/pgweb.git
synced 2025-07-25 16:02:27 +00:00
Ignore symlinks in docs tarballs
Required for postgresql <7.1
This commit is contained in:
@ -96,6 +96,10 @@ for member in tf:
|
||||
f = tf.extractfile(member)
|
||||
inner_tar = tarfile.open(fileobj=f)
|
||||
for inner_member in inner_tar:
|
||||
# Some old versions have index.html as a symlink - so let's
|
||||
# just ignore all symlinks to be on the safe side.
|
||||
if inner_member.issym(): continue
|
||||
|
||||
if inner_member.name.endswith('.html') or inner_member.name.endswith('.htm'):
|
||||
load_doc_file(inner_member.name, inner_tar.extractfile(inner_member))
|
||||
tf.close()
|
||||
|
Reference in New Issue
Block a user