You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dotnet Tar creates empty files that cause error in tar-rs
Program.cs (preferably use .net 8)
using System.Formats.Tar;MemoryStreamms=new(0);vartestStream= File.OpenWrite("trigger.tar");TarWriterarchive=new(testStream);PaxTarEntryentry=new(TarEntryType.RegularFile,"zeroed");
entry.DataStream =ms;
archive.WriteEntry(entry);
archive.Dispose();
testStream.Dispose();
rust code:
use std::fs::File;use tar::Archive;fnmain(){let file = File::open("trigger.tar").unwrap();letmut archive = Archive::new(file);let entries = archive.entries().unwrap();for entry in entries {let entry = entry.unwrap();println!("{:?}", entry.header());}}
what I get:
thread 'main' panicked at src/main.rs:9:27:
called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: "numeric field was not a number: when getting size for zeroed" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
example expected: ( "trigger.tar" created using GNU tar)
Dotnet Tar creates empty files that cause error in tar-rs
Program.cs (preferably use .net 8)
rust code:
what I get:
example expected: ( "trigger.tar" created using GNU tar)
The text was updated successfully, but these errors were encountered: