It's not possible to tar files starting with "system" in the file name.
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
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
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.
- 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di icsharpcode/SharpZipLib
-
*no response* bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
icsharpcode/SharpZipLib#905 · 1 commento ·
-
bug bzip2
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
icsharpcode/SharpZipLib#904 ·
-
SetLevel in ZipFile Apertaenhancement zip
Difficoltà 2/5 1-2 giorni Idoneità per principianti 55/100
icsharpcode/SharpZipLib#903 ·
-
*no response* bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 32/100
icsharpcode/SharpZipLib#901 · 1 commento ·
-
*no response* bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
icsharpcode/SharpZipLib#894 · 1 commento ·
Tutte le issue di icsharpcode/SharpZipLib
Issue simili
-
effort:S P3 refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
nightscout/nocturne#1532 ·
-
core dependencies
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
C#/.NET Roslyn LSP Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Suspicious code fragments Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
DotNetNext/SqlSugar#1458 ·