return r;
}
- // Create a file
- PakfireFile file;
- r = pakfire_file_create(&file, packager->pakfire);
- if (r)
- return r;
-
// Create a new file entry
struct archive_entry* entry = archive_entry_new();
if (!entry)
// Set path in archive
archive_entry_set_pathname(entry, path);
- pakfire_file_set_name(file, path);
// Copy all attributes from stat()
archive_entry_copy_stat(entry, &st);
- pakfire_file_copy_stat(file, &st);
// Write the header
r = archive_write_header(packager->payload, entry);
goto ERROR;
}
+ // Create a file
+ PakfireFile file;
+ r = pakfire_file_create(&file, packager->pakfire);
+ if (r)
+ goto ERROR;
+
+ r = pakfire_file_copy_archive_entry(file, entry);
+ if (r)
+ goto ERROR;
+
// Append the file to the filelist
pakfire_filelist_append(packager->filelist, file);