File stats are now correctly copied over to archive
ci/woodpecker/push/builder unknown status Details
ci/woodpecker/push/publish unknown status Details
ci/woodpecker/push/image Pipeline was successful Details
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details

pull/48/head
Jef Roosens 2022-01-20 17:45:04 +01:00
parent b6e9fa5b02
commit 01d961f68e
Signed by: Jef Roosens
GPG Key ID: B580B976584B5F30
2 changed files with 5 additions and 5 deletions

View File

@ -92,7 +92,7 @@ fn C.archive_entry_set_perm(&C.archive_entry, int)
fn C.archive_entry_clear(&C.archive_entry) fn C.archive_entry_clear(&C.archive_entry)
// Copy over a stat struct to the 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> #include <string.h>

View File

@ -119,10 +119,10 @@ fn (r &Repo) sync() ? {
} }
C.archive_entry_set_pathname(entry, &char(inner_path.str)) C.archive_entry_set_pathname(entry, &char(inner_path.str))
// C.archive_entry_copy_stat(entry, &st) C.archive_entry_copy_stat(entry, &st)
C.archive_entry_set_size(entry, st.st_size) // C.archive_entry_set_size(entry, st.st_size)
C.archive_entry_set_filetype(entry, C.AE_IFREG) // C.archive_entry_set_filetype(entry, C.AE_IFREG)
C.archive_entry_set_perm(entry, 0o644) // C.archive_entry_set_perm(entry, 0o644)
C.archive_write_header(a, entry) C.archive_write_header(a, entry)
fd := C.open(&char(actual_path.str), C.O_RDONLY) fd := C.open(&char(actual_path.str), C.O_RDONLY)