2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-25 19:10:10 +00:00

Import media world-readable

In the absence of extensions,
libarchive assumes ISO content
is private. Always make content
world readable for the sake of
confluent-public serving.
This commit is contained in:
Jarrod Johnson 2020-06-12 11:54:37 -04:00
parent b8dcfbae45
commit cb19425435

View File

@ -175,6 +175,10 @@ def extract_entries(entries, flags=0, callback=None, totalsize=None, extractlist
break
write_data_block(write_p, buff, size, offset)
write_finish_entry(write_p)
if os.path.isdir(str(entry)):
os.chmod(str(entry), 0o755)
else:
os.chmod(str(entry), 0o644)
if callback:
callback({'progress': float(sizedone) / float(totalsize)})