mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
[Already Fixed] In SharpCompress 0.41 IWriter.Write might create empty file instead of directory #731
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zhuxb711 on GitHub (Nov 28, 2025).
In 0.41, only
IWriter.Writeis available andIWriter.WriteDirectoryis not exists.To create an empty directory, usually, just like SharpZipLib, we will run the code below:
However, the
\will be removed through theNormalizeFilenameinsideZipWriter&TarWriter, will make the zero byte file with same name as directory.095c871174/src/SharpCompress/Writers/Tar/TarWriter.cs (L127)However, this issue should be fixed in the latest code, which introduced the
IWriter.WriteDirectoryPlease publish the new release ASAP if possible, or maybe we should publish the night build every day to Nuget for early access, thanks~
@zhuxb711 commented on GitHub (Nov 29, 2025):
Fixed in 0.42
@adamhathcock commented on GitHub (Nov 29, 2025):
🥳