fix weird end-of-file bug by having downloaders use inotify to directly track changes
This commit is contained in:
parent
ba4c7bfcbe
commit
cc0aaaab94
8 changed files with 246 additions and 283 deletions
|
|
@ -1,11 +1,9 @@
|
|||
use std::io::Write;
|
||||
use std::task::Waker;
|
||||
|
||||
use crc32fast::Hasher;
|
||||
use log::debug;
|
||||
use time::OffsetDateTime;
|
||||
|
||||
use crate::file::LiveWriter;
|
||||
use crate::UploadedFile;
|
||||
|
||||
const SIGNATURE_SIZE: u64 = 4;
|
||||
|
|
@ -280,12 +278,6 @@ impl<W: Write> ZipGenerator<W> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<W: LiveWriter> LiveWriter for ZipGenerator<W> {
|
||||
fn add_waker(&mut self, waker: Waker) {
|
||||
self.output.add_waker(waker);
|
||||
}
|
||||
}
|
||||
|
||||
impl<W: Write> Write for ZipGenerator<W> {
|
||||
fn write(&mut self, mut buf: &[u8]) -> std::io::Result<usize> {
|
||||
while !self.pending_metadata.is_empty() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue