feat(server): support uploading packages of arch "any"
This commit is contained in:
parent
c2f35aebac
commit
d446e39253
3 changed files with 40 additions and 11 deletions
|
|
@ -68,19 +68,24 @@ impl FileWriter {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn close(&mut self) {
|
||||
pub fn close(&mut self) -> crate::Result<()> {
|
||||
unsafe {
|
||||
ffi::archive_write_close(self.handle_mut());
|
||||
}
|
||||
match ffi::archive_write_close(self.handle_mut()) {
|
||||
ffi::ARCHIVE_OK => {
|
||||
self.closed = true;
|
||||
|
||||
self.closed = true;
|
||||
Ok(())
|
||||
}
|
||||
_ => Err(ArchiveError::from(self as &dyn Handle)),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for FileWriter {
|
||||
fn drop(&mut self) {
|
||||
if !self.closed {
|
||||
self.close();
|
||||
let _ = self.close();
|
||||
}
|
||||
|
||||
unsafe {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue