mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
How to get the name of a part when the volume changes (Multi-Volume) #282
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 @Headkillah on GitHub (Mar 12, 2018).
Is it possible to get the part-name of an entry while extracting it?
For example: I have a Multi-Volume with 20 parts (.rar - .r19)
I start the extracting and i need the name of the volume-part when the volume changes... Is this possible?
Hope that nobody blames me for this question, but i don´t have much knowledge with C#
@adamhathcock commented on GitHub (Mar 13, 2018):
This would probably require the Reader to have knowledge of the current volume. It probably already does. Just need to expose it like
CurrentEntryPull requests are welcome
@Headkillah commented on GitHub (Mar 13, 2018):
Thx for the help adam, i solved my problem :) After you give me a hint, i found here on github the fix for my problem.
I´m using the IArchive Interface and FilePartExtractionBeginEventArgs. And a little change in "FileInfoRarFilePart.cs". I´ve changed the part "return FileInfo.FullName" to "return FileInfo.Name" and removed the "File entry" thing :) For me it works PERFECT now .
@CrownParkComputing commented on GitHub (Mar 29, 2018):
Can u post the link to your solution as I think this will help with my progress issue
@Headkillah commented on GitHub (Mar 29, 2018):
ATM i have no link, put i can you post here a part of my solution. For me, it works very good. Don´t know if do this for you, too....
In "SharpCompress.Archives.Rar.FileInfoRarFilePart.cs" change it in this manner:
The Rest i´ve done is made with vb.net, so you have to convert it to c#. And this is only a little part of the solution... And a little bit old code, because i´m not at home :D
This is the important thing... In my project Label11 is the Label wich shows the actual volume (e.g. "test.r08")