fix: do not generate thumbnail if file is being written

This commit is contained in:
Michael Aaron Murphy 2026-04-10 06:08:21 +02:00
parent 0bd20e57e7
commit 15e40461e5
No known key found for this signature in database
GPG key ID: B2732D4240C9212C
4 changed files with 67 additions and 0 deletions

View file

@ -334,12 +334,14 @@ impl Op {
}
match self.kind {
OpKind::Copy => {
crate::operation::actively_writing_add(self.to.clone());
let result = self.copy(ctx, progress).await;
if result.is_err() {
_ = compio::fs::remove_file(&self.to).await;
}
crate::operation::actively_writing_remove(&self.to);
return result;
}
OpKind::Move { cross_device_copy } => {