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:?}");
file = upl;
}
ChunkState::Finished => break,
};
ChunkState::Finished(path) => {
info!("Finished {:?}!", path.display());
break;
}
}
debug!("file: {file:?}");
}

View file

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