mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-09-23 23:45:14 +00:00
Merge pull request #136 from zentron/master
Fix for `System.IO.Compression` created empty directory in zip
This commit is contained in:
@@ -16,7 +16,17 @@ namespace SharpCompress.Common.Zip.Headers
|
||||
|
||||
internal bool IsDirectory
|
||||
{
|
||||
get { return Name.EndsWith("/"); }
|
||||
get
|
||||
{
|
||||
if (Name.EndsWith("/"))
|
||||
return true;
|
||||
|
||||
//.NET Framework 4.5 : System.IO.Compression::CreateFromDirectory() probably writes backslashes to headers
|
||||
return CompressedSize == 0
|
||||
&& UncompressedSize == 0
|
||||
&& Name.EndsWith("\\");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected string DecodeString(byte[] str)
|
||||
|
||||
Reference in New Issue
Block a user