It's not possible to tar files starting with "system" in the file name.
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
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ả
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
- Make a folder that contains a file that has a name that starts with "system"
- 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
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của icsharpcode/SharpZipLib
-
*no response* bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
icsharpcode/SharpZipLib#905 · 1 bình luận ·
-
bug bzip2
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
icsharpcode/SharpZipLib#904 ·
-
SetLevel in ZipFile Đang mởenhancement zip
Độ khó 2/5 1-2 ngày Mức phù hợp với người mới 55/100
icsharpcode/SharpZipLib#903 ·
-
*no response* bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
icsharpcode/SharpZipLib#901 · 1 bình luận ·
-
*no response* bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
icsharpcode/SharpZipLib#894 · 1 bình luận ·
Tất cả issue của icsharpcode/SharpZipLib
Issue tương tự
-
effort:S P3 refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
nightscout/nocturne#1532 ·
-
core dependencies
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
C#/.NET Roslyn LSP Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Suspicious code fragments Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
DotNetNext/SqlSugar#1458 ·