Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

It's not possible to tar files starting with "system" in the file name.

Aperta
#859 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
csharp
Ambito
tooling

Direzione di ricerca

Riproduci il caso Windows/.NET Framework 4.x con SharpZipLib 1.4.2, partendo da TarArchive.CreateOutputTarArchive, TarEntry.CreateEntryFromFile e WriteEntry. Traccia come vengono enumerati gli elementi delle directory e verifica che i file che iniziano con "system" non vengano saltati. Il lavoro è completato quando un archivio generato include system.xml, system2.xml e system.txt come gli altri file.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug tar
Describe the bug

I am trying to tar a folder that contains a file that is called "system.xml". It doesn't work. If I however change the name of the file to "ssystem.xml" it works. But if I choose the name "system2.xml" or "system.txt" it doesn't work. So in other words, when I try to create an archive of files and one of the files starts with "system" it isn't added to the archive. Here is my code:

        static Task<string> CompressLocalTest()
        {
            return Task.Run(() =>
            {
                string sourcePath = @"C:\Users\bla\Documents\Backup";
                string destPath = @"C:\Users\bla\Documents\ssss\dd\fck.tar";

                using (var outStream = File.Create(destPath))
                {
                    var tarArchive = TarArchive.CreateOutputTarArchive(outStream);
                    AddDirectoryFilesToTar(tarArchive, sourcePath, true);
                }

                return destPath;
            });
        }

        public static void AddDirectoryFilesToTar(TarArchive tarArchive, string sourceDirectory, bool recurse)
        {
            TarEntry tarEntry = TarEntry.CreateEntryFromFile(sourceDirectory);
            tarArchive.WriteEntry(tarEntry, recurse);
        }
Reproduction Code

No response

Steps to reproduce
  1. Make a folder that contains a file that has a name that starts with "system"
  2. Try to make a tar archive using the SharpZipLib code.
Expected behavior

It should add the system.xml file like any other file. When I for instance tar with 7zip it works.

Operating System

Windows

Framework Version

.NET Framework 4.x

Tags

Tar

Additional context

I am using SharpZipLib 1.4.2.

Lingua principale
C#
Stelle
3.9k
Fork
1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di icsharpcode/SharpZipLib

Tutte le issue di icsharpcode/SharpZipLib

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.