#18 UnRarX Can't Extract Large FIles


It appears UnRarX falls over dead if a file is over two gigs or so in size
with the error message

File size for /path/to/file.rar is too large. Target: "file.rar" - missing.

What's up with that!?!


  • David A. Gatwood

    Logged In: YES

    I've fixed the bug. It's a bug in the par2 tool. In the file diskfile.cpp, after the
    "#else // !WIN32", change the four #define statements to the following four

    #define OffsetType off_t

    #define MaxOffset (sizeof(off_t) == 8 ? 0x7fffffffffffffffLL : 0x7fffffffL)

    #define LengthType fpos_t

    #define MaxLength (sizeof(fpos_t) == 8 ? 0xffffffffffffffffULL : 0xffffffffUL)

    You will get additional compile warnings, but they are harmless. Insert the
    resulting par2 binary into the Resources folder in place of the current one. I
    have tested this fix against the current (0.3) parcmdline sources, and it
    appears to work (at least so far---it's a big file---but it has scanned one 4.7
    decimal gigabyte RAR file so far without any problems).

  • David A. Gatwood

    Logged In: YES

    Well, two mistakes with this. First, need to change fseek to fseeko in all three
    places that it is used in diskfile.cpp, since fseek takes a 32-bit long.

    Second, I think I was wrong about the change to LengthType and MaxLength.
    I'm pretty sure only OffsetType and MaxOffset need to change.

    After making those fixes, I have verified that it can, in fact, fix a corrupted
    archive of well over 4 GB in size.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks