Verify sufficient disk space before unpack and/or incremental unpack

Want something added? Ask for it here.
Post Reply
PacoBell
Release Testers
Release Testers
Posts: 14
Joined: March 23rd, 2008, 5:17 pm

Verify sufficient disk space before unpack and/or incremental unpack

Post by PacoBell »

I do most of my work on my laptop, which generally means I don't have a lot of spare disk space (and there are times when "just get another hard drive" is not an option). At most, I can fit two 10GB+ NZB sets. The problem lies in sab's "dumb" method of unpacking said sets. Even if there isn't enough remaining disk space, it will still attempt to unpack the whole set anyway, inevitably fail, delete the unfinished output, and then move all the archive volumes to the designated completed directory. This wastes both time and transient storage. What I propose is to at least check first whether or not sab can complete the entire unpack operation (simple enough by referencing the archive's unpacked size metadata with some "clever text processing". See this post for more details. Apparently, even up to the latest unrar v3.92b1, the relevant text formatting hasn't changed.) and, if not, completely skip that step and simply move the archive volumes immediately. Alternatively, sab could check for just enough space for the first volume of the set and begin to unpack, but incrementally deleting each volume as soon as it's done. This effectively means you no longer have to have double the the disk space to extract each set, only N+1 volumes. Of course, this should only be done after passing both par2 and internal RAR integrity tests. The first suggestion should be default behavior while the second would be optional. Think of it as a graceful failure mode.

/ Maybe too difficult?
// Or even unwanted?
/// Sorry for the (partial) dupe, but I thought it'd be better than necroposting :P
Last edited by PacoBell on January 23rd, 2010, 8:56 am, edited 1 time in total.
Post Reply