mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
Add support for extensions over r99 (s00, s01... z99) #562
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @forkicks on GitHub (Mar 9, 2023).
If a multivolume rar has over 100 volumes, the naming moves from r99 to s00, then up to s99, then t00, so on.
The way the code is set up in RarArchiveVolumeFactory.cs, it will only ever match up to r99, and fail to process more. This makes sharpcompress throw errors when decompressing those large sets of files.
@adamhathcock commented on GitHub (Mar 10, 2023):
Didn't know it went over 100
@forkicks commented on GitHub (Mar 10, 2023):
In RarArchiveVolumeFactory.cs, if you add something like:
as another else before the "//split .001, .002", it should match the remaining archives (up to z99. I have never seen any real life examples going over it, and I'm unsure how the naming would change after that. Maybe a00?).
I haven't created a pull request to fix this because I'm not familiar enough with the codebase to know if there are side effects of adding change here.
You don't have to change any of the existing conditions or regexes, simply add this one before falling to the 001, 002 test (another if/else).
[edit: typo and code tag]
@Erior commented on GitHub (Mar 10, 2023):
If you set WinRAR to generate according to old suffix it will go from z to { and then fail at | because it is not a valid file name in Windows.
The default is currently name.partXXXX.rar