Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#859 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
csharp
Lĩnh vực
tooling

Hướng nghiên cứu

Tái hiện trường hợp Windows/.NET Framework 4.x với SharpZipLib 1.4.2, bắt đầu từ TarArchive.CreateOutputTarArchive, TarEntry.CreateEntryFromFile và WriteEntry. Theo dõi cách các mục thư mục được liệt kê và xác minh rằng các tệp bắt đầu bằng "system" không bị bỏ qua. Hoàn tất khi một archive được tạo có system.xml, system2.xml và system.txt giống như các tệp khác.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
C#
Star
3.9k
Fork
1k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của icsharpcode/SharpZipLib

Tất cả issue của icsharpcode/SharpZipLib

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.