Volume's FileName doesn't work when readerOptions is specified #687

Closed
opened 2026-01-29 22:15:53 +00:00 by claunia · 0 comments
Owner

Originally created by @Kimi-Arthur on GitHub (Jul 4, 2025).

I'm trying to get FileName of archive parts with

        var archive = ArchiveFactory.Open("a.part01.rar", new ReaderOptions {
            Password = null,
            ArchiveEncoding = new ArchiveEncoding(Encoding.UTF8, Encoding.UTF8)
        });
        foreach (var volume in archive.Volumes) {
            Console.WriteLine($"Volume {volume.Index}: {volume.FileName}");
        }

It gives me empty file names while the Index can be retrieved normally.

If I remove the options like

        var archive = ArchiveFactory.Open("a.part01.rar");
        foreach (var volume in archive.Volumes) {
            Console.WriteLine($"Volume {volume.Index}: {volume.FileName}");
        }

It works properly.

Expectation: It should return the relevant archive file names in both cases.

Example project can be found here: https://drive.google.com/file/d/1knv9PH24TkHipKwXrL7hmxth96thxXxb/view?usp=sharing

Originally created by @Kimi-Arthur on GitHub (Jul 4, 2025). I'm trying to get FileName of archive parts with ```cs var archive = ArchiveFactory.Open("a.part01.rar", new ReaderOptions { Password = null, ArchiveEncoding = new ArchiveEncoding(Encoding.UTF8, Encoding.UTF8) }); foreach (var volume in archive.Volumes) { Console.WriteLine($"Volume {volume.Index}: {volume.FileName}"); } ``` It gives me empty file names while the Index can be retrieved normally. If I remove the options like ```cs var archive = ArchiveFactory.Open("a.part01.rar"); foreach (var volume in archive.Volumes) { Console.WriteLine($"Volume {volume.Index}: {volume.FileName}"); } ``` It works properly. Expectation: It should return the relevant archive file names in both cases. Example project can be found here: https://drive.google.com/file/d/1knv9PH24TkHipKwXrL7hmxth96thxXxb/view?usp=sharing
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#687