fix weird end-of-file bug by having downloaders use inotify to directly track changes

This commit is contained in:
xenofem 2022-04-29 22:36:44 -04:00
parent ba4c7bfcbe
commit cc0aaaab94
8 changed files with 246 additions and 283 deletions

View file

@ -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() {