Sharpcompress not read all entries using TarArchive #62

Open
opened 2026-01-29 22:06:02 +00:00 by claunia · 5 comments
Owner

Originally created by @kalpesh2804 on GitHub (Sep 9, 2015).

I added 10,000 files in 2 different folder but below sample can read only 1 folder.
sample code:

        using (Stream stream = File.Open(FileName, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite))
        {
            if (TarArchive.IsTarFile(stream))
            {
                stream.Seek(0, SeekOrigin.Begin);
                objTar = TarArchive.Open(stream);

                foreach (var tarEnt in objTar.Entries)
                {
                    if (!tarEnt.IsDirectory)
                    {
                        lstFiles.Add(tarEnt.FilePath);
                        FileList.Add(tarEnt);
                    }
                }
            }
        }
Originally created by @kalpesh2804 on GitHub (Sep 9, 2015). I added 10,000 files in 2 different folder but below sample can read only 1 folder. sample code: ``` using (Stream stream = File.Open(FileName, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite)) { if (TarArchive.IsTarFile(stream)) { stream.Seek(0, SeekOrigin.Begin); objTar = TarArchive.Open(stream); foreach (var tarEnt in objTar.Entries) { if (!tarEnt.IsDirectory) { lstFiles.Add(tarEnt.FilePath); FileList.Add(tarEnt); } } } } ```
Author
Owner

@adamhathcock commented on GitHub (Sep 9, 2015):

Do you have a sample file for me to test with? Hopefully a small one.

@adamhathcock commented on GitHub (Sep 9, 2015): Do you have a sample file for me to test with? Hopefully a small one.
Author
Owner

@kalpesh2804 commented on GitHub (Sep 9, 2015):

Its creating issue in large file (approx. 1 GB). if you want i will try to prepare it and upload it.

@kalpesh2804 commented on GitHub (Sep 9, 2015): Its creating issue in large file (approx. 1 GB). if you want i will try to prepare it and upload it.
Author
Owner

@adamhathcock commented on GitHub (Sep 9, 2015):

I guess I'm better off trying to recreate it.

@adamhathcock commented on GitHub (Sep 9, 2015): I guess I'm better off trying to recreate it.
Author
Owner

@kalpesh2804 commented on GitHub (Sep 11, 2015):

did you reproduce this error ?

@kalpesh2804 commented on GitHub (Sep 11, 2015): did you reproduce this error ?
Author
Owner

@adamhathcock commented on GitHub (Sep 11, 2015):

I likely won't have time any time soon to actual code or debug anything.

@adamhathcock commented on GitHub (Sep 11, 2015): I likely won't have time any time soon to actual code or debug anything.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#62