Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#859 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
csharp
Área
tooling

Línea de trabajo

Reproduce el caso de Windows/.NET Framework 4.x con SharpZipLib 1.4.2, empezando por TarArchive.CreateOutputTarArchive, TarEntry.CreateEntryFromFile y WriteEntry. Rastrea cómo se enumeran las entradas de directorio y verifica que no se omitan los archivos cuyo nombre comienza por "system". Se considera terminado cuando un archivo generado incluye system.xml, system2.xml y system.txt como los demás archivos.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
C#
Estrellas
3.9k
Forks
1k
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de icsharpcode/SharpZipLib

Todos los issues de icsharpcode/SharpZipLib

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.