forked from vieter-v/vieter
File stats are now correctly copied over to archive
parent
b6e9fa5b02
commit
01d961f68e
|
@ -92,7 +92,7 @@ fn C.archive_entry_set_perm(&C.archive_entry, int)
|
|||
fn C.archive_entry_clear(&C.archive_entry)
|
||||
|
||||
// Copy over a stat struct to the archive entry
|
||||
fn C.archive_entry_copy_stat(&C.archive_entry, &C.stat)
|
||||
fn C.archive_entry_copy_stat(entry &C.archive_entry, const_stat &C.stat)
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
@ -119,10 +119,10 @@ fn (r &Repo) sync() ? {
|
|||
}
|
||||
|
||||
C.archive_entry_set_pathname(entry, &char(inner_path.str))
|
||||
// C.archive_entry_copy_stat(entry, &st)
|
||||
C.archive_entry_set_size(entry, st.st_size)
|
||||
C.archive_entry_set_filetype(entry, C.AE_IFREG)
|
||||
C.archive_entry_set_perm(entry, 0o644)
|
||||
C.archive_entry_copy_stat(entry, &st)
|
||||
// C.archive_entry_set_size(entry, st.st_size)
|
||||
// C.archive_entry_set_filetype(entry, C.AE_IFREG)
|
||||
// C.archive_entry_set_perm(entry, 0o644)
|
||||
C.archive_write_header(a, entry)
|
||||
|
||||
fd := C.open(&char(actual_path.str), C.O_RDONLY)
|
||||
|
|
Loading…
Reference in New Issue