@@ 11,7 11,7 @@ import (
)
fn main() {
- var err: Errno
+ var err: tar.Errno
var t: tar.Tar
t, err = tar.open("test.tar", "w")
@@ 21,8 21,8 @@ fn main() {
}
t.addFile("pak.json")
- t.addFile("microtar/README.md")
- t.addFile("tar_linux.umi")
+ t.addFile("pak/")
+ t.addFile("README.md")
err = t.finalize()
if err != 0 {
@@ 193,8 193,6 @@ umc__tar_add_file(UmkaStackSlot *p, UmkaStackSlot *r)
};
strncpy(h.name, file, sizeof(h.name) - 1);
- mtar_write_header(tar, &h);
-
if (S_ISDIR(st.st_mode)) {
return;
}
@@ 205,6 203,8 @@ umc__tar_add_file(UmkaStackSlot *p, UmkaStackSlot *r)
return;
}
+ mtar_write_header(tar, &h);
+
fseek(f, 0, SEEK_END);
size_t size = ftell(f);
fseek(f, 0, SEEK_SET);