fix: do not generate thumbnail if file is being written
This commit is contained in:
parent
0bd20e57e7
commit
15e40461e5
4 changed files with 67 additions and 0 deletions
|
|
@ -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 } => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue