Skip to content
Snippets Groups Projects
Commit 7dd82e01 authored by Simon McVittie's avatar Simon McVittie
Browse files

Merge branch 'ttimo/early_sniper_expansion' into 'main'

SLR: Ensure that uncompressed size is plausible

See merge request !775
parents c82ac769 cd2fb531
No related branches found
No related tags found
1 merge request!775SLR: Ensure that uncompressed size is plausible
...@@ -108,6 +108,10 @@ extract_archive() { ...@@ -108,6 +108,10 @@ extract_archive() {
uncompressed_size=$(xz --robot --list "$2" | awk '/totals/ {print $5; exit}' || true) uncompressed_size=$(xz --robot --list "$2" | awk '/totals/ {print $5; exit}' || true)
;; ;;
esac esac
# The above may fail if the archive is corrupted
if [[ "$uncompressed_size" -eq 0 ]]; then
uncompressed_size=250000000
fi
if [ -n "$uncompressed_size" ]; then if [ -n "$uncompressed_size" ]; then
# Choose the blocking factor (counting in 512-byte blocks) so that # Choose the blocking factor (counting in 512-byte blocks) so that
# we process slightly more than 1% of the file per record, for a # we process slightly more than 1% of the file per record, for a
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment