Skip to content

[DRAFT] Calculate the amount of disk needed before the Extract Operation

The idea of this patch is to iterate over all the Entry* instances of the file, and sum all of them before starting to extract the file, checking if the total sum of size for each element, is smaller than the current empty space of the folder / partition.

I have a few questions about this, as I believe that this can slow down the operations quite a lot (we need to read the whole compressed file to fetch information before actually starting to extract it) - but it's also important as the lack of space on a folder can lead to a failure mid-decompression, and on those cases it's better that we don't decompress at all.

There are two branches on this code: if we have a list of files, things work: I can iterate through the list of files and walk through the result. but if the list of files is empty, I try to run a LoadJob to fetch the Archive::Entry*, but this approach does not work (the inner Job does not seems to run)

Any hints?

Merge request reports