main logging

This commit is contained in:
Jörn-Michael Miehe 2025-06-04 16:54:03 +00:00
parent 7e9cc00d7c
commit 9c2fdd95c6
2 changed files with 7 additions and 4 deletions

View file

@ -41,8 +41,11 @@ fn main() {
error!("error: {e:?}"); error!("error: {e:?}");
file = upl; file = upl;
} }
ChunkState::Finished => break, ChunkState::Finished(path) => {
}; info!("Finished {:?}!", path.display());
break;
}
}
debug!("file: {file:?}"); debug!("file: {file:?}");
} }

View file

@ -32,7 +32,7 @@ pub enum UploadError {
pub enum ChunkState { pub enum ChunkState {
Ok(FileUploading), Ok(FileUploading),
Err(FileUploading, UploadError), Err(FileUploading, UploadError),
Finished, Finished(PathBuf),
} }
impl FileUploading { impl FileUploading {
@ -86,7 +86,7 @@ impl FileUploading {
self.offset = res_offset; self.offset = res_offset;
if self.offset == self.size { if self.offset == self.size {
return ChunkState::Finished; return ChunkState::Finished(self.path);
} }
ChunkState::Ok(self) ChunkState::Ok(self)